Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayPool ¶
func MakeDelayTaskPool ¶
func MakeDelayTaskPool(env environment.ServiceEnvironment) DelayPool
type DelayPoolImpl ¶
type DelayPoolImpl struct {
// contains filtered or unexported fields
}
func (*DelayPoolImpl) Delay ¶
func (p *DelayPoolImpl) Delay(deadline time.Duration, fn func()) *DelayTask
func (*DelayPoolImpl) Stop ¶
func (p *DelayPoolImpl) Stop(ctx context.Context)
type DelayTaskPriorityQueue ¶
type DelayTaskPriorityQueue []*DelayTask
func (*DelayTaskPriorityQueue) Len ¶
func (pq *DelayTaskPriorityQueue) Len() int
func (*DelayTaskPriorityQueue) Less ¶
func (pq *DelayTaskPriorityQueue) Less(i, j int) bool
func (*DelayTaskPriorityQueue) Pop ¶
func (pq *DelayTaskPriorityQueue) Pop() interface{}
func (*DelayTaskPriorityQueue) Push ¶
func (pq *DelayTaskPriorityQueue) Push(x interface{})
func (*DelayTaskPriorityQueue) Swap ¶
func (pq *DelayTaskPriorityQueue) Swap(i, j int)
type PriorityTask ¶
type PriorityTask struct {
// contains filtered or unexported fields
}
type PriorityTaskPool ¶
type PriorityTaskPool interface { Pool AddTask(priority int, fn func()) *PriorityTask }
func MakePriorityTaskPool ¶
func MakePriorityTaskPool(env environment.ServiceEnvironment, name string) PriorityTaskPool
type PriorityTaskPoolImpl ¶
type PriorityTaskPoolImpl struct {
// contains filtered or unexported fields
}
func (*PriorityTaskPoolImpl) AddTask ¶
func (p *PriorityTaskPoolImpl) AddTask(priority int, fn func()) *PriorityTask
func (*PriorityTaskPoolImpl) Start ¶
func (p *PriorityTaskPoolImpl) Start(ctx context.Context) error
func (*PriorityTaskPoolImpl) Stop ¶
func (p *PriorityTaskPoolImpl) Stop(ctx context.Context)
type TaskPool ¶
func MakeTaskPool ¶
func MakeTaskPool(env environment.ServiceEnvironment, name string) TaskPool
type TaskPoolImpl ¶
type TaskPoolImpl struct {
// contains filtered or unexported fields
}
func (*TaskPoolImpl) AddTask ¶
func (p *TaskPoolImpl) AddTask(fn func()) *Task
func (*TaskPoolImpl) Stop ¶
func (p *TaskPoolImpl) Stop(ctx context.Context)
type TaskPriorityQueue ¶
type TaskPriorityQueue []*PriorityTask
func (*TaskPriorityQueue) Len ¶
func (pq *TaskPriorityQueue) Len() int
func (*TaskPriorityQueue) Less ¶
func (pq *TaskPriorityQueue) Less(i, j int) bool
func (*TaskPriorityQueue) Pop ¶
func (pq *TaskPriorityQueue) Pop() interface{}
func (*TaskPriorityQueue) Push ¶
func (pq *TaskPriorityQueue) Push(x interface{})
func (*TaskPriorityQueue) Swap ¶
func (pq *TaskPriorityQueue) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.