Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsMiddleware ¶
type MetricsMiddleware struct { Histogram metrics.Histogram Counter metrics.Counter // contains filtered or unexported fields }
func PrometheusMetricsMiddleware ¶
func PrometheusMetricsMiddleware(host string) *MetricsMiddleware
type RateLimiter ¶
type RateLimiterMiddleware ¶
type RateLimiterMiddleware struct {
// contains filtered or unexported fields
}
func NewRateLimiterMiddleware ¶
func NewRateLimiterMiddleware(tokens int, every time.Duration) *RateLimiterMiddleware
NewRateLimiterMiddleware creates a new http middleware that honors the provided limit.
Click to show internal directories.
Click to hide internal directories.