pool

package
v0.0.153 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DelayPool

type DelayPool interface {
	Pool
	Delay(deadline time.Duration, fn func()) *DelayTask
}

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) Start

func (p *DelayPoolImpl) Start(ctx context.Context) error

func (*DelayPoolImpl) Stop

func (p *DelayPoolImpl) Stop(ctx context.Context)

type DelayTask

type DelayTask struct {
	// contains filtered or unexported fields
}

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 Pool

type Pool interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context)
}

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 Task

type Task struct {
	// contains filtered or unexported fields
}

type TaskPool

type TaskPool interface {
	Pool
	AddTask(fn func()) *Task
}

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) Start

func (p *TaskPoolImpl) Start(ctx context.Context) error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL