-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support cancellation of NGINX Plus API calls #205
Comments
This was referenced Jan 18, 2024
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
mpstefan
added
the
help wanted
Issues identified as good community contribution opportunities
label
Jul 3, 2024
mpstefan
added
refined
Issues that are ready to be prioritized
and removed
help wanted
Issues identified as good community contribution opportunities
labels
Jul 17, 2024
6 tasks
6 tasks
Added @oliveromahony on Agent team for implementation. Let us know if this is wrong! |
@mpstefan my current workload and availability in the next month doesn't allow me to do this as a priority. If someone else can take it on that would be great. I'll sync with the team tomorrow |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
As a developer, I'd like to be able to cancel any call I make to NGINX Plus API.
This is required for my software for:
Describe the solution you'd like
Using Context https://pkg.go.dev/context#Context is common for that.
func (client *NginxClient) AddHTTPServer(upstream string, server UpstreamServer) error {
Describe alternatives you've considered
There is hard-corded timeout that internally creates a context that ensures that a request to NGINX Plus API can't take longer than 10s.
https://github.com/nginxinc/nginx-plus-go-client/blob/970573b15737ed294b847ff19989bf9d0e6b182c/client/nginx.go#L855
However, I'd like to control cancelation via a context (which can be cancelled before timeout expires). Additionally, I want to control the value of the timeout.
Additional context
The text was updated successfully, but these errors were encountered: