Documentation ¶
Overview ¶
Package algorithm contains all rate limiting algorithms that define the Strategy interface
Package algorithm contains all rate limiting algorithms that define the Strategy interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FixedWindow ¶
type FixedWindow struct {
// contains filtered or unexported fields
}
FixedWindow strategy
func (*FixedWindow) Run ¶
func (fw *FixedWindow) Run(req *interfaces.Request) (*interfaces.Result, error)
Run function implements the fixed window rate limiter logic
type RollingWindow ¶
type RollingWindow struct {
// contains filtered or unexported fields
}
RollingWindow strategy
func (*RollingWindow) Run ¶
func (rw *RollingWindow) Run(req *interfaces.Request) (*interfaces.Result, error)
Run function implements the fixed window rate limiter logic
Click to show internal directories.
Click to hide internal directories.