Documentation
¶
Index ¶
- type DelayQueue
- func (d *DelayQueue) Consume(ctx context.Context, timestamp int64) (gvar.Vars, error)
- func (d *DelayQueue) Produce(ctx context.Context, messages []interface{}) error
- func (d *DelayQueue) Remove(ctx context.Context, timestamp int64) (int64, error)
- func (d *DelayQueue) RemoveByMsg(ctx context.Context, message interface{}) (int64, error)
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayQueue ¶
type DelayQueue struct {
// contains filtered or unexported fields
}
DelayQueue 延迟队列.
func (*DelayQueue) Produce ¶
func (d *DelayQueue) Produce(ctx context.Context, messages []interface{}) error
Produce 将一个或多个消息放到延迟队列.
func (*DelayQueue) RemoveByMsg ¶
func (d *DelayQueue) RemoveByMsg(ctx context.Context, message interface{}) (int64, error)
Remove 删除指定消息.
type Option ¶
type Option func(*Options)
Option 配置项.
func WithRedisGroup ¶
WithRedisGroup 设置使用配置的哪组redis服务器(或集群).
Click to show internal directories.
Click to hide internal directories.