queue

package
v0.0.0-...-26ab6e5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	QueueName string
}

type Queue

type Queue[T any] interface {
	Push(ctx context.Context, items ...T) error
	Pop(ctx context.Context, popRange int) ([]T, error)
}

type Redis

type Redis[T any] struct {
	QueueConfig Config
	Client      redis.UniversalClient
	Codec       codec.Msgpack
}

func (Redis[T]) Pop

func (r Redis[T]) Pop(ctx context.Context, popRange int) ([]T, error)

func (Redis[T]) Push

func (r Redis[T]) Push(ctx context.Context, items ...T) error

Jump to

Keyboard shortcuts

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