Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExceeded = errors.New("timeout: request context deadline exceeded")
ErrExceeded identifies a downstream context deadline.
Functions ¶
func Doc ¶ added in v0.7.1
func Doc() zinc.MiddlewareDoc
Doc describes the middleware for the OpenAPI spec: a request that runs past the deadline is answered with 503. Pass it to Document beside the middleware.
func New ¶
func New(configs ...Config) zinc.Middleware
New installs Config.Timeout as the downstream request deadline. It does not run the handler in a detached goroutine, so cancellation remains idiomatic.
Types ¶
Click to show internal directories.
Click to hide internal directories.