Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShardWorkerPool ¶
type ShardWorkerPool interface { Init() Shard(source uint32) uint32 Offer(job ShardJob, block bool) }
func NewShardWokerPool ¶
func NewShardWokerPool(size int, numShards int, workerFunc WorkerFunc) (ShardWorkerPool, error)
type WorkerFunc ¶
type WorkerFunc func(shard int, jobCh <-chan interface{})
type WorkerPool ¶
type WorkerPool interface { Schedule(task func()) ScheduleAlways(task func()) ScheduleAuto(task func()) }
func NewWorkerPool ¶
func NewWorkerPool(size int) WorkerPool
Click to show internal directories.
Click to hide internal directories.