From 26374ab63a68e2ecae26160d2b159cee35361b67 Mon Sep 17 00:00:00 2001 From: Todd Date: Thu, 30 May 2024 23:07:54 +0000 Subject: [PATCH] backport of commit 5d4c9567a95828e4fc03af3c92612297ced02485 --- api/proxy/option.go | 3 +++ api/proxy/proxy.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/api/proxy/option.go b/api/proxy/option.go index 0b5b4f73fb..3f37d89c33 100644 --- a/api/proxy/option.go +++ b/api/proxy/option.go @@ -133,6 +133,9 @@ func WithSessionTeardownTimeout(with time.Duration) Option { } // WithApiClient provides an optional Boundary API client +// Experimental: It is unclear whether the current usage of this option is the +// approach that we want to take in the long term. This may be removed at any +// point going forward. func WithApiClient(with *api.Client) Option { return func(o *Options) error { o.withApiClient = with diff --git a/api/proxy/proxy.go b/api/proxy/proxy.go index c5148d8060..789dbfccf3 100644 --- a/api/proxy/proxy.go +++ b/api/proxy/proxy.go @@ -264,6 +264,9 @@ func (p *ClientProxy) Start(opt ...Option) (retErr error) { p.cancel() return } + + // TODO: Determine if this is useful or if there is a better approach + // that we may use in the long term. if p.apiClient != nil { // If we can tell that the session for the connection we just // closed is terminated, we can close the listener, otherwise