limit

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Limiter

type Limiter struct {
	// contains filtered or unexported fields
}

Limiter use tcp vegas + codel for adaptive limit.

func New

func New(c *aqm.Config) *Limiter

New returns a new Limiter that allows events up to adaptive rtt.

func (*Limiter) Allow

func (l *Limiter) Allow(ctx context.Context) (func(rate.Op), error)

Allow immplemnet rate.Limiter. if error is returned,no need to call done()

Directories

Path Synopsis
bench

Jump to

Keyboard shortcuts

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