From 9f2190bc014c151e1712eb6b7bb39afd03a5cb26 Mon Sep 17 00:00:00 2001 From: Che Lin Date: Wed, 23 Oct 2024 11:14:49 -0700 Subject: [PATCH] Address feedback for PR #2308 - 3 --- cmd/options.go | 4 ++-- internal/healthcheck/healthcheck_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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) }