events

package
v0.0.0-...-a514d7f Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventEmitter

type EventEmitter[E any] interface {
	Emit(ctx context.Context, event E)
}

type EventSubscriber

type EventSubscriber[E any] interface {
	Subscribe(id string) <-chan E
}

type Topic

type Topic[E any] interface {
	EventEmitter[E]
	EventSubscriber[E]
}

func NewTopic

func NewTopic[E any](bufferSize ...int) Topic[E]

NewTopic creates a new topic with an optional buffer size Omiting the buffer size will create an unbuffered topic

Jump to

Keyboard shortcuts

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