-
Notifications
You must be signed in to change notification settings - Fork 618
Add configurable read timeout support to InMemoryEventDispatcher #8786
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: main
Are you sure you want to change the base?
Add configurable read timeout support to InMemoryEventDispatcher #8786
Conversation
|
Hi @intojhanurag. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: intojhanurag The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hey @Leo6Leo , Can you take a look on this PR , if you have a moment ? |
Cali0707
left a comment
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.
Hey @intojhanurag thanks for the PR!
I'm not sure this actually meaningfully changes anything in it's current state - as far as I can tell the read timeout is always set here (and is not configurable to users):
| readTimeout = 15 * time.Minute |
cc @creydr @twoGiants do you think we should be exposing config for this somewhere?
| // TODO set read timeouts? | ||
| readTimeout := args.ReadTimeout | ||
| if readTimeout <= 0 { | ||
| readTimeout = 30 * time.Second |
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.
can you extract this into a constant?
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.
Done !
Changes
NewEventDispatcherto append thekncloudevents.WithReadTimeout()option when creating theHTTPEventReceiver.ReadTimeoutas part ofInMemoryEventDispatcherArgsto allow configuration.