aqm

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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