Documentation ¶ Index ¶ type Bucket func NewBucket(token int) *Bucket func (b *Bucket) Access(cyc, incr, decr int) bool type Limiter func New(cap, cyc int) *Limiter func (l *Limiter) Access(id string, incr, decr int) bool func (l *Limiter) GetCap() int func (l *Limiter) GetCyc() int Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Bucket ¶ type Bucket struct { // contains filtered or unexported fields } func NewBucket ¶ func NewBucket(token int) *Bucket func (*Bucket) Access ¶ func (b *Bucket) Access(cyc, incr, decr int) bool type Limiter ¶ type Limiter struct { // contains filtered or unexported fields } func New ¶ func New(cap, cyc int) *Limiter func (*Limiter) Access ¶ func (l *Limiter) Access(id string, incr, decr int) bool func (*Limiter) GetCap ¶ func (l *Limiter) GetCap() int func (*Limiter) GetCyc ¶ func (l *Limiter) GetCyc() int Source Files ¶ View all Source files limiter.go Click to show internal directories. Click to hide internal directories.