ratelimit

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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
}

Bucket contains token for request

func New

func New(cap, r int) *Bucket

New a Bucket to limit request with token

func (*Bucket) Enable added in v1.1.0

func (b *Bucket) Enable(enabled bool)

Enable ...

func (*Bucket) Enabled added in v1.1.0

func (b *Bucket) Enabled() bool

Enabled ...

func (*Bucket) Handle

func (b *Bucket) Handle(c *plugin.Context)

Handle func for bucket to work as a plugin.Plugin

func (*Bucket) Name added in v1.1.0

func (b *Bucket) Name() string

Name ...

func (*Bucket) Status added in v1.1.0

func (b *Bucket) Status() plugin.PlgStatus

Status ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL