-
Notifications
You must be signed in to change notification settings - Fork 258
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
HTTP client factory for per-request clients #147
base: main
Are you sure you want to change the base?
Conversation
2d48af8
to
d4fb2fe
Compare
@ryanuber PTAL |
type CleanPooledClientFactory struct { | ||
} | ||
|
||
func (f *CleanPooledClientFactory) New() HTTPClient { |
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.
Something to consider is adding an error
to the returned values. Some factories may have a problem while constructing a client and they will not have a good way to propagate the error up. WDYT?
d4fb2fe
to
56e7391
Compare
Rebased. This is ready for review/merge. |
56e7391
to
1b1732c
Compare
Rebased again. 3 years and counting :) |
Please see #139 (comment) for the background.
This approach allows the library user to decide how they want to handle any client/transport related concerns. It decouples the library from those concerns as it doesn't have to have an opinion on how keep-alives need to work. Different situations need different behavior so giving users full control is the best option.