cli: Fix gRPC Hook reference (#358)

close #357
This commit is contained in:
Iñigo 2020-03-16 21:15:04 +01:00 committed by GitHub
parent c7f6428884
commit 1f0b0f515d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ type GrpcHook struct {
Client pb.HookServiceClient
}
func (g GrpcHook) Setup() error {
func (g *GrpcHook) Setup() error {
opts := []grpc_retry.CallOption{
grpc_retry.WithBackoff(grpc_retry.BackoffLinear(time.Duration(g.Backoff) * time.Second)),
grpc_retry.WithMax(uint(g.MaxRetries)),
@ -35,7 +35,7 @@ func (g GrpcHook) Setup() error {
return nil
}
func (g GrpcHook) InvokeHook(typ HookType, info handler.HookEvent, captureOutput bool) ([]byte, int, error) {
func (g *GrpcHook) InvokeHook(typ HookType, info handler.HookEvent, captureOutput bool) ([]byte, int, error) {
ctx := context.Background()
req := &pb.SendRequest{Hook: marshal(info)}
resp, err := g.Client.Send(ctx, req)