Documentation ¶
Index ¶
- func SimpleAuthTokenVerify(w http.ResponseWriter, r *http.Request) error
- func WithMaxInFlightLimit(handler http.Handler, limit int) http.Handler
- func WithRequestID(handler http.Handler) http.Handler
- func WithSimpleAuthTokenVerify(handler http.Handler) http.Handler
- func WithTimeout(h http.Handler, timeoutFunc timeoutFuncType) http.Handler
- func WithTimeoutFilter(handler http.Handler, timeout time.Duration) http.Handler
- func WithWaitGroup(handler http.Handler, wg *utilwaitgroup.SafeWaitGroup) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SimpleAuthTokenVerify ¶
func SimpleAuthTokenVerify(w http.ResponseWriter, r *http.Request) error
SimpleAuthTokenVerify xxx
func WithMaxInFlightLimit ¶
WithMaxInFlightLimit limits the number of in-flight requests to buffer size of the passed in channel.
func WithSimpleAuthTokenVerify ¶
WithSimpleAuthTokenVerify xxx
func WithTimeout ¶
WithTimeout returns an http.Handler that runs h with a timeout determined by timeoutFunc. The new http.Handler calls h.ServeHTTP to handle each request, but if a call runs for longer than its time limit, the handler responds with a 504 Gateway Timeout error and the message provided. (If msg is empty, a suitable default message will be sent.) After the handler times out, writes by h to its http.ResponseWriter will return http.ErrHandlerTimeout. If timeoutFunc returns a nil timeout channel, no timeout will be enforced. recordFn is a function that will be invoked whenever a timeout happens.
func WithTimeoutFilter ¶
WithTimeoutFilter times out non-long-running requests after the time given by timeout.
func WithWaitGroup ¶
func WithWaitGroup(handler http.Handler, wg *utilwaitgroup.SafeWaitGroup) http.Handler
WithWaitGroup adds all non long-running requests to wait group, which is used for graceful shutdown.
Types ¶
This section is empty.