Back to

Package ratelimit

Latest Go to latest

The latest major version is .

Published: Jan 20, 2020 | License: MIT | Module:


func DefaultAllowOpts

func DefaultAllowOpts() allowOptions

DefaultAllowOpts returns the default allow options.

type AllowOption

type AllowOption interface {

AllowOptions allow options.

type DoneInfo

type DoneInfo struct {
	Err error
	Op  Op

DoneInfo done info.

type Limiter

type Limiter interface {
	Allow(ctx context.Context, opts ...AllowOption) (func(info DoneInfo), error)

Limiter limit interface.

type Op

type Op int

Op operations type.

const (
	// Success opertion type: success
	Success Op = iota
	// Ignore opertion type: ignore
	// Drop opertion type: drop

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier