event

package
v0.0.0-...-99b6f83 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus[T any] struct {
	// contains filtered or unexported fields
}

func (*Bus[T]) Publish

func (b *Bus[T]) Publish(v T)

func (*Bus[T]) Subscribe

func (b *Bus[T]) Subscribe() <-chan T

Subscribe registers a best-effort subscriber. Events are dropped when the subscriber's buffer is full so a slow observer cannot block publishers.

func (*Bus[T]) SubscribeLossless

func (b *Bus[T]) SubscribeLossless() <-chan T

SubscribeLossless registers a backpressured subscriber. Publish waits for this subscriber when its buffer is full instead of dropping events.

Jump to

Keyboard shortcuts

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