queue

package module
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const Version = "queue/v0.16.1"

Variables

This section is empty.

Functions

func Dequeue

func Dequeue[T any](q swarm.Broker, category ...string) (<-chan swarm.Msg[T], chan<- swarm.Msg[T])

Dequeue message

func Enqueue

func Enqueue[T any](q swarm.Broker, category ...string) (chan<- T, <-chan T)

Create egress and dead-letter queue channels for the category

func Must

func Must(broker swarm.Broker, err error) swarm.Broker

func TypeOf

func TypeOf[T any]() string

normalized type name

Types

type Enqueuer

type Enqueuer[T any] interface {
	Put(T) error
	Enq(string, T) error
}

Enqueue message to the broker synchronously, blocking the routine until message is accepted by the broker.

func New

func New[T any](q swarm.Broker, category ...string) Enqueuer[T]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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