queue

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	Processed   prometheus.Counter
	Drop        prometheus.Counter
	Passthrough prometheus.Counter
	QueueCap    prometheus.Gauge
	QueueLen    prometheus.Gauge
}

type Item

type Item interface {
	Eta() time.Time
}

type Queue

type Queue[T Item] struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue[T Item](
	logger zerolog.Logger,
	size int,
	flushTimeout time.Duration,
	passthroughChan chan<- T,
	counter Counter,
) *Queue[T]

func (*Queue[T]) Close

func (q *Queue[T]) Close()

func (*Queue[T]) Done

func (q *Queue[T]) Done() <-chan struct{}

func (*Queue[T]) Len

func (q *Queue[T]) Len() int

func (*Queue[T]) ReceiveChannel

func (q *Queue[T]) ReceiveChannel() <-chan T

func (*Queue[T]) SendChannel

func (q *Queue[T]) SendChannel() chan<- T

Jump to

Keyboard shortcuts

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