Documentation ¶ Index ¶ type CallBack type Delay func NewDelay(rdsOption *redis.Options, vhost string) Delay func (t *Delay) On(queue string, cb CallBack) func (t *Delay) Remove(queue string, id string) func (t *Delay) Scan() ([]string, error) func (t *Delay) Set(queue string, id string, timestamp int) error func (t *Delay) SetTimeout(queue string, id string, duration time.Duration) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type CallBack ¶ type CallBack func(id string, queue string) type Delay ¶ type Delay struct { // contains filtered or unexported fields } func NewDelay ¶ func NewDelay(rdsOption *redis.Options, vhost string) Delay func (*Delay) On ¶ func (t *Delay) On(queue string, cb CallBack) 注册回调 func (*Delay) Remove ¶ func (t *Delay) Remove(queue string, id string) func (*Delay) Scan ¶ func (t *Delay) Scan() ([]string, error) 轮询到期任务 func (*Delay) Set ¶ func (t *Delay) Set(queue string, id string, timestamp int) error 设置超时时间(时间戳),单位毫秒 func (*Delay) SetTimeout ¶ func (t *Delay) SetTimeout(queue string, id string, duration time.Duration) error Source Files ¶ View all Source files delay.go Click to show internal directories. Click to hide internal directories.