queue

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryQueue

type InMemoryQueue struct {
	// contains filtered or unexported fields
}

func NewInMemoryQueue

func NewInMemoryQueue() *InMemoryQueue

func (*InMemoryQueue) Pop

func (q *InMemoryQueue) Pop(_ context.Context, group string) (string, error)

func (*InMemoryQueue) PopAll

func (q *InMemoryQueue) PopAll(_ context.Context, group string) ([]string, error)

func (*InMemoryQueue) Push

func (q *InMemoryQueue) Push(_ context.Context, group string, data string) error

type Queue

type Queue interface {
	Push(context.Context, string, string) error
	Pop(context.Context, string) (string, error)
	PopAll(context.Context, string) ([]string, error)
}

type RueidisQueue

type RueidisQueue struct {
	// contains filtered or unexported fields
}

func NewRueidisQueue

func NewRueidisQueue(client rueidis.Client) *RueidisQueue

func (*RueidisQueue) Pop

func (q *RueidisQueue) Pop(ctx context.Context, group string) (string, error)

func (*RueidisQueue) PopAll

func (q *RueidisQueue) PopAll(ctx context.Context, group string) ([]string, error)

func (*RueidisQueue) Push

func (q *RueidisQueue) Push(ctx context.Context, group string, t string) error

Jump to

Keyboard shortcuts

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