Documentation ¶
Index ¶
- Variables
- func CreateEndpointThrottlerFromFacade(throttlerName string, facade interface{}) gin.HandlerFunc
- func NewGlobalThrottler(maxConnections uint32) (*globalThrottler, error)
- func NewResponseLoggerMiddleware(thresholdDurationForLoggingRequest time.Duration) *responseLoggerMiddleware
- func NewSourceThrottler(maxNumRequests uint32) (*sourceThrottler, error)
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 CreateEndpointThrottlerFromFacade ¶ added in v1.2.23
func CreateEndpointThrottlerFromFacade(throttlerName string, facade interface{}) gin.HandlerFunc
CreateEndpointThrottlerFromFacade 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 NewResponseLoggerMiddleware ¶ added in v1.2.0
func NewResponseLoggerMiddleware(thresholdDurationForLoggingRequest time.Duration) *responseLoggerMiddleware
NewResponseLoggerMiddleware returns a new instance of responseLoggerMiddleware
func NewSourceThrottler ¶
NewSourceThrottler creates a new instance of a sourceThrottler
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.