Documentation ¶
Index ¶
Constants ¶
View Source
const (
MsgTypeKey = "msg-type"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
func NewWorkerPool ¶
func NewWorkerPool(queueSize, sleep, workerCount int, logger *zap.SugaredLogger) *WorkerPool
func (*WorkerPool) AddHandler ¶
func (wp *WorkerPool) AddHandler(msgType string, handler worker.MsgHandler)
func (*WorkerPool) DelHandler ¶
func (wp *WorkerPool) DelHandler(msgType string)
func (*WorkerPool) Start ¶
func (wp *WorkerPool) Start()
func (*WorkerPool) Stop ¶
func (wp *WorkerPool) Stop()
Click to show internal directories.
Click to hide internal directories.