xdelay

package
v0.1.29 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine(slotCount int) *Engine

创建一个延迟消息

func (*Engine) AddTask

func (e *Engine) AddTask(seconds uint, callback TaskCallback, params ...interface{}) error

添加任务

func (*Engine) Close

func (e *Engine) Close()

关闭延迟消息

func (*Engine) GetTaskDistribution added in v0.1.27

func (e *Engine) GetTaskDistribution() (curIdx int, cnt []int)

任务分布

func (*Engine) Start

func (e *Engine) Start()

启动延迟消息

type TaskCallback

type TaskCallback func(args ...interface{})

执行的任务函数

Jump to

Keyboard shortcuts

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