Documentation
¶
Overview ¶
Package timeout provides timeout utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
Middleware applies a per-request context timeout without writing responses.
func New ¶
func New(opts Options) (*Middleware, error)
New constructs a timeout middleware with the given duration.
func (*Middleware) Handler ¶
func (m *Middleware) Handler(next http.Handler) http.Handler
Handler wraps the next handler with a context timeout.
func (*Middleware) Middleware ¶
func (m *Middleware) Middleware() func(http.Handler) http.Handler
Middleware implements ports.Middleware via Handler adapter.
Click to show internal directories.
Click to hide internal directories.