aqm
import "github.com/ccheers/xpkg/container/queue/aqm"
Index
Variables
var ErrLimitExceed = fmt.Errorf("limit exceed")
type Config
Config codel config.
type Config struct {
Target int64 // target queue delay (default 20 ms).
Internal int64 // sliding minimum time window width (default 500 ms)
MaxOutstanding int64 // max num of concurrent acquires
}
type Queue
Queue queue is CoDel req buffer queue.
type Queue struct {
// contains filtered or unexported fields
}
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
Stat is the Statistics of codel.
type Stat struct {
Dropping bool
FaTime int64
DropNext int64
Packets int
}
Generated by gomarkdoc