rwheel

package module
v0.0.0-...-c69efe5 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTickerFunc

func AddTickerFunc(key string, fx Func, ctx *context.Context, d time.Duration) error

AddTickerFunc 加入一个计时任务

func AddTimerFunc

func AddTimerFunc(key string, fx Func, ctx *context.Context, d time.Duration) error

AddTimerFunc 加入一个定时任务

func RemoveTickerFunc

func RemoveTickerFunc(key string)

RemoveTickerFunc 移除指定的计时任务

func RemoveTimerFunc

func RemoveTimerFunc(key string)

RemoveTimerFunc 移除指定的定时任务

func ResetTickerFunc

func ResetTickerFunc(key string, d time.Duration) error

ResetTickerFunc 重置指定的计时任务

func ResetTimerFunc

func ResetTimerFunc(key string, d time.Duration) error

ResetTimerFunc 重置指定的定时任务

func SetParamsTickerFunc

func SetParamsTickerFunc(key string, pKey any, pValue any) error

SetParamsTickerFunc 设置指定的计时任务的Context的key-value

func SetParamsTimerFunc

func SetParamsTimerFunc(key string, pKey any, pValue any) error

SetParamsTimerFunc 设置指定的定时任务的Context的key-value

Types

type Func

type Func func(funcKey string, ctx *context.Context)

type FuncName

type FuncName struct {
	Key      string        `json:"key"`
	RunTime  int64         `json:"run_time"`
	Interval time.Duration `json:"interval"`
}

func RangeTickerFunc

func RangeTickerFunc() []FuncName

RangeTickerFunc 获取当前所有的计时器函数信息

func RangeTimerFunc

func RangeTimerFunc() []FuncName

RangeTimerFunc 获取当前所有的定时器函数信息

Jump to

Keyboard shortcuts

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