Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BadDelayed = &badDelayed{}
View Source
var ErrorRepeatShutdown = errors.New("重复关闭")
Functions ¶
func SetSingleCallback ¶
func SetSingleCallback(callback func(signal os.Signal, d *DispatchingDelayed)) options.Option
SetSingleCallback 设置监控信号回调
Types ¶
type DispatchingDelayed ¶
type DispatchingDelayed struct { sync.RWMutex Worker int64 // 并发数(实际执行任务) // contains filtered or unexported fields }
DispatchingDelayed 调度延时任务. Concurrency safety
func NewDispatchingDelayed ¶
func NewDispatchingDelayed(o ...options.Option) *DispatchingDelayed
NewDispatchingDelayed 初始化调度实例
func (*DispatchingDelayed) AddDelayed ¶
func (d *DispatchingDelayed) AddDelayed(delayed Delayed)
AddDelayed 添加延时任务
func (*DispatchingDelayed) IsInvalid ¶
func (d *DispatchingDelayed) IsInvalid(delayed Delayed) bool
IsInvalid 判断任务是否有效
Click to show internal directories.
Click to hide internal directories.