feat(clientproxy): automatically close boundary connect when proxy is no longer in use (#6232)

Co-authored-by: Andrew Gaffney <andrew@gaffney.cc>
This commit is contained in:
daniandAndrew Gaffney authored and GitHub committed 2025-11-14 09:37:30 -05:00
1 parent d0050ad881
commit 08015e9d98
7 files changed
+289 -48

No files matched your search

+10
View File
@@ -39,6 +39,7 @@ type Options struct {
WithSkipSessionTeardown bool
withSessionTeardownTimeout time.Duration
withApiClient *api.Client
withInactivityTimeout time.Duration
}
// Option is a function that takes in an options struct and sets values or
@@ -142,3 +143,12 @@ func WithApiClient(with *api.Client) Option {
return nil
}
}
// WithInactivityTimeout provides an optional duration after which a session
// with no active connections will be cancelled
func WithInactivityTimeout(with time.Duration) Option {
return func(o *Options) error {
o.withInactivityTimeout = with
return nil
}
}