aqm

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2019 License: MIT Imports: 5 Imported by: 0

README

aqm

项目简介

队列管理算法

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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.

Jump to

Keyboard shortcuts

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