queue

package
v0.0.0-...-daad6bc Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package queue implements a generic queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQueue

func NewQueue[T any](maxNbItem int, maxRetentionTime clock.Duration, flushCB func([]T)) chan T

NewQueue returns a chan to enqueue elements The flushCB function will be called with a slice of elements as soon as * either maxNbItem elements have been enqueued since the last flush * or maxRetentionTime has elapsed since the first element has been enqueued after the last flush.

Types

This section is empty.

Jump to

Keyboard shortcuts

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