event

package
v5.0.0-...-03972fd Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 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 Messenger

type Messenger interface {
	Trigger(ctx context.Context, name string, event interface{}) error
}

type Publisher

type Publisher interface {
	Messenger
	Registrar
}

func New

func New() Publisher

type Registrar

type Registrar interface {
	On(name string, subscriber Subscriber)
	Off(name string, subscriber *interface{})
}

type Subscriber

type Subscriber func(ctx context.Context, event interface{}) error

Jump to

Keyboard shortcuts

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