schedulex

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeapTaskPool

type HeapTaskPool struct {
	sync.WaitGroup
	// contains filtered or unexported fields
}

func NewHeapTaskPool

func NewHeapTaskPool(now base.FNNow) *HeapTaskPool

func (*HeapTaskPool) AddTask

func (tp *HeapTaskPool) AddTask(key string, t time.Time, exec TaskFunc, params ...interface{}) error

func (*HeapTaskPool) RemoveTask

func (tp *HeapTaskPool) RemoveTask(key string) error

func (*HeapTaskPool) Start

func (tp *HeapTaskPool) Start()

func (*HeapTaskPool) Stop

func (tp *HeapTaskPool) Stop()

type OpType

type OpType int

type ScheduleTaskPool

type ScheduleTaskPool interface {
	AddTask(key string, t time.Time, exec TaskFunc, params ...any) error
	RemoveTask(key string) error

	Stop()
}

func CreateHeapTaskPool

func CreateHeapTaskPool() ScheduleTaskPool

func CreateHeapTaskPoolWithFNNow

func CreateHeapTaskPoolWithFNNow(now base.FNNow) ScheduleTaskPool

type TaskFunc

type TaskFunc func(key string, args ...any)

Directories

Path Synopsis
others

Jump to

Keyboard shortcuts

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