Discover Packages
github.com/DIMO-Network/telemetry-api
internal
limits
package
Version:
v0.0.19
Opens a new window with list of versions in this module.
Published: Jul 20, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Limiter adds request timeouts to HTTP handlers.
New creates a new Limiter, which adds the given request timeout to HTTP handlers.
The string maxRequestDuration must be parseable as a positive time.Duration; e.g.,
"5m", "30s".
AddRequestTimeout wraps the given handler in a new one that cancels the
request context after the duration specified in the limiter.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.