MCPcopy
hub / github.com/labstack/echo / ContextTimeoutConfig

Struct ContextTimeoutConfig

middleware/context_timeout.go:15–24  ·  view source on GitHub ↗

ContextTimeoutConfig defines the config for ContextTimeout middleware.

Source from the content-addressed store, hash-verified

13
14// ContextTimeoutConfig defines the config for ContextTimeout middleware.
15type ContextTimeoutConfig struct {
16 // Skipper defines a function to skip middleware.
17 Skipper Skipper
18
19 // ErrorHandler is a function when error arises in middeware execution.
20 ErrorHandler func(c *echo.Context, err error) error
21
22 // Timeout configures a timeout for the middleware
23 Timeout time.Duration
24}
25
26// ContextTimeout returns a middleware which returns error (503 Service Unavailable error) to client
27// when underlying method returns context.DeadlineExceeded error.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected