package
Version:
v0.0.0-...-20d9be1
Opens a new window with list of versions in this module.
Published: May 2, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Collector struct {
Work chan *Job
}
type Job struct {
Data interface{}
JobFunc JobFunc
}
Job 任务
type JobFunc func(id int64, data interface{})
JobFunc 任务执行函数
Len returns the queue length. Safe for concurrent use.
func (e *Queue) Pop() (v interface{})
Pop 取出队列,(阻塞模式)
func (e *Queue) Push(v interface{})
func (e *Queue) TryPop() (v interface{}, ok bool)
试着取出队列(非阻塞模式)返回ok == false 表示空
Wait blocks until the queue is empty or closed.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.