broker

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker[T any] interface {
	Topic(context.Context, string) Topic[T]
}

func Local

func Local[T any]() Broker[T]

type Subscription

type Subscription interface {
	ID() string
	Unsubscribe()
}

type Topic

type Topic[T any] interface {
	Publish(context.Context, events.Event) error
	Subscribe(context.Context, events.Hook[T]) (Subscription, error)
}

Jump to

Keyboard shortcuts

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