chi: github.com/go-chi/chi/_examples/limits Files

Command limits

Limits ====== This example demonstrates the use of Timeout, and Throttle middlewares.

Timeout:

cancel a request if processing takes longer than 2.5 seconds,
server will respond with a http.StatusGatewayTimeout.

Throttle:

limit the number of in-flight requests along a particular
routing path and backlog the others.

Package Files

main.go

Package main imports 7 packages (graph). Updated 2019-12-21. Refresh now. Tools for package owners.