README ¶ Ratelimit Algorithms bbr Expand ▾ Collapse ▴ Documentation ¶ Index ¶ Variables type DoneFunc type DoneInfo type Limiter Constants ¶ This section is empty. Variables ¶ View Source var ( // ErrLimitExceed is returned when the rate limiter is // triggered and the request is rejected due to limit exceeded. ErrLimitExceed = errors.New("rate limit exceeded") ) Functions ¶ This section is empty. Types ¶ type DoneFunc ¶ added in v0.1.1 type DoneFunc func(DoneInfo) DoneFunc is done function. type DoneInfo ¶ type DoneInfo struct { Err error } DoneInfo is done info. type Limiter ¶ type Limiter interface { Allow() (DoneFunc, error) } Limiter is a rate limiter. Source Files ¶ View all Source files ratelimit.go Directories ¶ Show internal Expand all Path Synopsis bbr Click to show internal directories. Click to hide internal directories.