pubsub

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

type EventHandler[T any] func(T)

type Property

type Property[T any] interface {
	Pub(value T)
	Sub(ctx context.Context, fn EventHandler[T])
	Value() T
}

func NewProperty

func NewProperty[T any](value T) Property[T]

type Topic

type Topic[T any] interface {
	Pub(value T)
	Sub(ctx context.Context, fn EventHandler[T])
}

func NewTopic

func NewTopic[T any]() Topic[T]

Jump to

Keyboard shortcuts

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