queue

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyQueue = errors.New("queue is empty")
)

Functions

This section is empty.

Types

type StatsIncrEvent

type StatsIncrEvent struct {
	LinkID string            `redis:"linkId"`
	Labels map[string]string `redis:"labels"`
}

func (*StatsIncrEvent) MarshalBinary

func (s *StatsIncrEvent) MarshalBinary() (data []byte, err error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*StatsIncrEvent) UnmarshalBinary

func (s *StatsIncrEvent) UnmarshalBinary(data []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type StatsQueue

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

func NewStatsQueue

func NewStatsQueue(redis *redis.Client) *StatsQueue

func (*StatsQueue) Dequeue

func (q *StatsQueue) Dequeue(ctx context.Context) (StatsIncrEvent, error)

func (*StatsQueue) Enqueue

func (q *StatsQueue) Enqueue(ctx context.Context, event StatsIncrEvent) error

Jump to

Keyboard shortcuts

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