Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
任务执行函数。 特别注意,如果ttl不是0。但是因为某些原因不需要执行下一次操作了。则需要返回nil 比如。需要对某特定条件数据执行某个操作。在这之前自然是会检查这个数据是否存在或者是否能被操作等。 如果没有拿到这条数据,则直接返回nil
type Option ¶ added in v0.0.3
type Option func(o *Options)
Option Option
func Logger ¶ added in v0.0.3
func Logger(s *zap.SugaredLogger) Option
type Store ¶
type Store interface { Push(t *Task) error //添加任务 Pop(t *Task) error //剔除任务 Update(t *Task) error //更新任务--重复调用Push其实就是update了。感觉这个有点多余 //获取单个执行任务。 ReadTask(key string) (*Task, error) //拉取所有任务队列.返回任务名称 FetchJob(step int64) ([]string, error) }
type Store struct { store StoreInterface }
Click to show internal directories.
Click to hide internal directories.