diff --git a/cmd/options.go b/cmd/options.go index f166d8fba..b8ff855f4 100644 --- a/cmd/options.go +++ b/cmd/options.go @@ -98,8 +98,8 @@ func WithLazyRefresh() Option { } } -// WithConnRefuseNotify configures the Proxy to start a goroutine and run the -// given notify callback function in the event of a connection refuse. +// WithConnRefuseNotify configures the Proxy to call the provided function when +// a connection is refused. The notification function is run in a goroutine. func WithConnRefuseNotify(n func()) Option { return func(c *Command) { c.connRefuseNotify = n diff --git a/internal/healthcheck/healthcheck_test.go b/internal/healthcheck/healthcheck_test.go index b4729bb3f..bb86b72ea 100644 --- a/internal/healthcheck/healthcheck_test.go +++ b/internal/healthcheck/healthcheck_test.go @@ -78,7 +78,7 @@ func newProxyWithParams(t *testing.T, maxConns uint64, dialer cloudsql.Dialer, i Instances: instances, MaxConnections: maxConns, } - p, err := proxy.NewClient(context.Background(), dialer, logger, c) + p, err := proxy.NewClient(context.Background(), dialer, logger, c, nil) if err != nil { t.Fatalf("proxy.NewClient: %v", err) }