package
Version:
v1.1.9
Opens a new window with list of versions in this module.
Published: Mar 18, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Queue CoDel buffer 缓冲队列
Pop 弹出 CoDel Queue 的请求
// 出队,没有请求则会阻塞
queue.Pop()
Output:
Push 请求进入CoDel Queue
如果返回错误为nil,则在完成请求处理后,调用方必须调用q.Done()
// 入队
if err := queue.Push(context.TODO()); err != nil {
if err == bbr.LimitExceed {
// todo 处理过载保护错误
} else {
// todo 处理其他错误
}
}
Output:
func (q *Queue) Reload(c *config)
Reload 重新加载配置
Stat 返回CoDel状态信息
// start 体现 CoDel 状态信息
start := queue.Stat()
_ = start
Output:
Source Files
¶
Click to show internal directories.
Click to hide internal directories.