From 1f0b0f515dca8da509ff211b18991cd93b943851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo?= Date: Mon, 16 Mar 2020 21:15:04 +0100 Subject: [PATCH] cli: Fix gRPC Hook reference (#358) close #357 --- cmd/tusd/cli/hooks/grpc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tusd/cli/hooks/grpc.go b/cmd/tusd/cli/hooks/grpc.go index a55a1b4..3bd7ec3 100644 --- a/cmd/tusd/cli/hooks/grpc.go +++ b/cmd/tusd/cli/hooks/grpc.go @@ -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)