Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidMaxNumRequests = errors.New("max number of requests value is invalid")
ErrInvalidMaxNumRequests signals that a provided number of requests is invalid
View Source
var ErrTooManyRequests = errors.New("too many requests")
ErrTooManyRequests signals that too many requests were simultaneously received
Functions ¶
func CreateEndpointThrottler ¶ added in v1.0.139
func CreateEndpointThrottler(throttlerName string) gin.HandlerFunc
CreateEndpointThrottler will create a middleware-type of handler to be used in conjunction with special REST API end points that need to be better protected
func NewGlobalThrottler ¶
NewGlobalThrottler creates a new instance of a globalThrottler
func NewSourceThrottler ¶
NewSourceThrottler creates a new instance of a sourceThrottler
func WithFacade ¶ added in v1.0.139
func WithFacade(facade Handler) gin.HandlerFunc
WithFacade middleware will set up a facade object in the gin context
Types ¶
Click to show internal directories.
Click to hide internal directories.