redisq

package
v0.0.119 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

func (q *Queue) Add(ctx context.Context, msg *queue_.Message) (string, error)

https://redis.io/commands/xadd/ * 为自动生成Id XADD taskq-redis-stream * taskq "123"

func (*Queue) AddResult

func (q *Queue) AddResult(ctx context.Context, result *queue_.MessageResult, expired time.Duration) (string, error)

func (*Queue) Delete

func (q *Queue) Delete(ctx context.Context, msg *queue_.Message) error

XACK taskq-redis-stream taskq 1671960330664-0 XDEL taskq-redis-stream 1671960330664-0

func (*Queue) FetchN

func (q *Queue) FetchN(ctx context.Context, n int64, waitTimeout time.Duration) ([]*queue_.Message, error)

func (*Queue) FetchOne

func (q *Queue) FetchOne(ctx context.Context, waitTimeout time.Duration) (*queue_.Message, error)

func (*Queue) FetchResult

func (q *Queue) FetchResult(ctx context.Context, key string) (*queue_.MessageResult, error)

func (*Queue) Len

func (q *Queue) Len() (int64, error)

XLEN taskq-redis-stream

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL