Documentation ¶
Index ¶
- type Queue
- func (q *Queue) Add(ctx context.Context, msg *queue_.Message) (string, error)
- func (q *Queue) AddResult(ctx context.Context, result *queue_.MessageResult, expired time.Duration) (string, error)
- func (q *Queue) Delete(ctx context.Context, msg *queue_.Message) error
- func (q *Queue) FetchN(ctx context.Context, n int64, waitTimeout time.Duration) ([]*queue_.Message, error)
- func (q *Queue) FetchOne(ctx context.Context, waitTimeout time.Duration) (*queue_.Message, error)
- func (q *Queue) FetchResult(ctx context.Context, key string) (*queue_.MessageResult, error)
- func (q *Queue) Len() (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func NewQueue ¶
func NewQueue(db *redis.Client, opts queue_.QueueOptions) *Queue
func (*Queue) Add ¶
https://redis.io/commands/xadd/ * 为自动生成Id XADD taskq-redis-stream * taskq "123"
func (*Queue) Delete ¶
XACK taskq-redis-stream taskq 1671960330664-0 XDEL taskq-redis-stream 1671960330664-0
func (*Queue) FetchResult ¶
Click to show internal directories.
Click to hide internal directories.