The ctx timeout middleware allows client timeouts to be controlled through Context.
Notes
When using this middleware, it is necessary to manually add it on the client.
The functionality of this middleware overlaps with that of client.DoDeadline and client.DoTimeout, so only one of them is needed to control the timeout.
For HTTP2, this middleware is the only way to control the timeout, and client.DoDeadline and client.DoTimeout don't work.