-
Notifications
You must be signed in to change notification settings - Fork 23
wip: add refreshable *tls.Config param support #761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Generate changelog in
|
return clientOrHTTPClientParamFunc(func(b *httpClientBuilder) error { | ||
b.TLSConfig = m | ||
return nil | ||
}), m.Update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this, the clients would be responsible for calling updateFn
whenever they want to refresh the underlying *tls.Config
of their clients.
3e34392
to
b6bf1c5
Compare
@@ -61,14 +71,14 @@ func ConfigureTransport(r RefreshableTransportParams, mapFn func(p TransportPara | |||
// RefreshableTransport implements http.RoundTripper backed by a refreshable *http.Transport. | |||
// The transport and internal dialer are each rebuilt when any of their respective parameters are updated. | |||
type RefreshableTransport struct { | |||
refreshable.Refreshable // contains *http.Transport | |||
atomic.Pointer[http.Transport] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change this?
} | ||
|
||
type MappedRefreshableTLSConfig struct { | ||
conf atomic.Pointer[tls.Config] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we reimplementing refreshable?
Before this PR
Alternative impl to #725
After this PR
==COMMIT_MSG==
==COMMIT_MSG==
Possible downsides?