Back to godoc.org

Package aqm

v0.3.3
Latest Go to latest

The latest major version is .

Published: Jan 20, 2020 | License: MIT | Module: github.com/bilibili/kratos

Index

type Config

type Config struct {
	Target   int64 // target queue delay (default 20 ms).
	Internal int64 // sliding minimum time window width (default 500 ms)
}

Config codel config.

type Queue

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

Queue queue is CoDel req buffer queue.

func Default

func Default() *Queue

Default new a default codel queue.

func New

func New(conf *Config) *Queue

New new codel queue.

func (*Queue) Pop

func (q *Queue) Pop()

Pop req from CoDel request buffer queue.

func (*Queue) Push

func (q *Queue) Push(ctx context.Context) (err error)

Push req into CoDel request buffer queue. if return error is nil,the caller must call q.Done() after finish request handling

func (*Queue) Reload

func (q *Queue) Reload(c *Config)

Reload set queue config.

func (*Queue) Stat

func (q *Queue) Stat() Stat

Stat return the statistics of codel

type Stat

type Stat struct {
	Dropping bool
	FaTime   int64
	DropNext int64
	Packets  int
}

Stat is the Statistics of codel.

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