Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultInterval ¶
GetDefaultInterval 获取默认的调度时长
Types ¶
type ServiceEventHandler ¶
type ServiceEventHandler struct {
TaskValues model.TaskValues
}
ServiceEventHandler 服务上下线监听回调
func (*ServiceEventHandler) OnServiceAdded ¶
func (s *ServiceEventHandler) OnServiceAdded(event *common.PluginEvent) error
OnServiceAdded 服务上线回调
func (*ServiceEventHandler) OnServiceDeleted ¶
func (s *ServiceEventHandler) OnServiceDeleted(event *common.PluginEvent) error
OnServiceDeleted 服务下线回调
type TaskRoutine ¶
type TaskRoutine interface { // 进行任务调度 Schedule() (chan<- *model.PriorityTask, model.TaskValues) // 结束协程 Destroy() }
TaskRoutine 任务调度协程接口
func NewTaskRoutine ¶
func NewTaskRoutine(periodicTask *model.PeriodicTask) TaskRoutine
NewTaskRoutine 创建任务调度协程
Click to show internal directories.
Click to hide internal directories.