async_task

package
v0.0.0-...-957e36a Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

func RegisterHandler

func RegisterHandler(name string, handler Handler)

Types

type Handler

type Handler func(ctx *swe.Context, taskCtx TaskContext) error

type Scheduler

type Scheduler interface {
	AddTask(ctx *swe.Context, name, param string, ts int64, cb func(id int64)) error
}

func GetScheduler

func GetScheduler() Scheduler

type TaskContext

type TaskContext interface {
	ID() int64
	Name() string
	Param() string
	ChangeSchedule(ts int64)
}

Jump to

Keyboard shortcuts

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