ContextTimeoutConfig defines the config for ContextTimeout middleware.
| 13 | |
| 14 | // ContextTimeoutConfig defines the config for ContextTimeout middleware. |
| 15 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected