From be6eee18cb0f6d04cee8556fc758cccc052b1e8a Mon Sep 17 00:00:00 2001 From: koooge Date: Thu, 31 May 2018 12:49:15 +0000 Subject: [PATCH] Change to const --- pkg/helm/client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 9adfa1cf3..7fdaf7cb0 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -36,6 +36,8 @@ import ( // grpc library default is 4MB const maxMsgSize = 1024 * 1024 * 20 +const timeout = 5 + // Client manages client side of the Helm-Tiller protocol. type Client struct { opts options @@ -44,8 +46,7 @@ type Client struct { // NewClient creates a new client. func NewClient(opts ...Option) *Client { var c Client - // set some sane defaults - c.Option(ConnectTimeout(5)) + c.Option(ConnectTimeout(timeout)) return c.Option(opts...) } @@ -202,7 +203,7 @@ func (h *Client) GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, err } req := &rls.GetVersionRequest{} ctx := NewContext() - h.Option(ConnectTimeout(5)) + h.Option(ConnectTimeout(timeout)) if reqOpts.before != nil { if err := reqOpts.before(ctx, req); err != nil {