-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add PreReq option sr API #867
Conversation
ea4728c
to
3108f47
Compare
pkg/sr/clientopt.go
Outdated
type PreReqFunc func(req *http.Request) error | ||
|
||
// PreReq sets a hook func to call before every request is sent. | ||
func PreReq(preReq PreReqFunc) ClientOpt { |
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.
I'd remove the defined type for the function and just have this be an inline function, wdyt?
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.
Good call! I'm not sure now why I left that in there, but it's not really useful so I removed it. Thanks!
Signed-off-by: Mihai Todor <[email protected]>
Signed-off-by: Mihai Todor <[email protected]>
3108f47
to
1b122a5
Compare
This is a follow-up to twmb/franz-go#867. Since `sr.URLs()` from franz-go doesn't validate URLs during client initialisation, I decided to leave our `url.Parse()` in there because this way we can catch malformed URLs on startup, before any HTTP requests are attempted. Signed-off-by: Mihai Todor <[email protected]>
This is a follow-up to twmb/franz-go#867. Since `sr.URLs()` from franz-go doesn't validate URLs during client initialisation, I decided to leave our `url.Parse()` in there because this way we can catch malformed URLs on startup, before any HTTP requests are attempted. Signed-off-by: Mihai Todor <[email protected]>
This is a follow-up to twmb/franz-go#867. Since `sr.URLs()` from franz-go doesn't validate URLs during client initialisation, I decided to leave our `url.Parse()` in there because this way we can catch malformed URLs on startup, before any HTTP requests are attempted. Also update the changelog. We forgot to do it in #3134 Signed-off-by: Mihai Todor <[email protected]>
No description provided.