Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StatusCodeRate ¶
func StatusCodeRate(counter Counter, getIP IPExtractor, limit, ttl int) mux.MiddlewareFunc
Types ¶
type IPExtractor ¶
type MapCounter ¶
type MapCounter struct {
// contains filtered or unexported fields
}
func NewMapCounter ¶
func NewMapCounter() *MapCounter
type RedisCounter ¶
type RedisCounter struct {
// contains filtered or unexported fields
}
func NewRedisCounter ¶
func NewRedisCounter(redisURL string) *RedisCounter
Click to show internal directories.
Click to hide internal directories.