Skip to content
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 the SetWriteDeadline and SetReadDeadline interfaces #1439

Open
Mik- opened this issue Jan 31, 2024 · 0 comments
Open

Support the SetWriteDeadline and SetReadDeadline interfaces #1439

Mik- opened this issue Jan 31, 2024 · 0 comments

Comments

@Mik-
Copy link

Mik- commented Jan 31, 2024

I'm using the new ResponseController, introduced in Go 1.20 to set a timeout on the response writer.
Your delegator did not respect the new interfaces SetWriteDeadline and SetReadDeadline.

Example:

rc := http.NewResponseController(w)
err = rc.SetWriteDeadline(time.Now().Add(5 * time.Second)) // returns ErrNotSupported

It would be nice, if the InstrumentHandlerDuration or InstrumentHandlerCounter would support this.

I'm currently using v1.18.0.

@Mik- Mik- changed the title Support the SetWriteDeadline and SetDeadline Support the SetWriteDeadline and SetReadDeadline interfaces Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant