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:
1 parent
d0050ad881
commit
08015e9d98
7 files changed
+289
-48
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user