events

package
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

This section is empty.

Variables

This section is empty.

Functions

func Dequeue

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

Dequeue event

func Enqueue

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

Enqueue creates pair of channels - to send messages - failed messages (dead-letter queue)

func TypeOf

func TypeOf[T any]() string

normalized type name

Types

type Enqueuer

type Enqueuer[T any, E swarm.EventKind[T]] interface {
	Put(*E) error
	Enq(string, *E) error
}

func New

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

Jump to

Keyboard shortcuts

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