events

package
v1.1.0-1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SubscribeAsync

func SubscribeAsync[T Event](b *Bus, sub func(T))

func SubscribeSync

func SubscribeSync[T Event](b *Bus, sub func(T) error)

Types

type Bus

type Bus struct {
	// contains filtered or unexported fields
}

func NewBus

func NewBus(logger log.Logger) *Bus

func (*Bus) Publish

func (b *Bus) Publish(event Event) error

type DidCommitBlock

type DidCommitBlock struct {
	Index uint64
	Time  time.Time
	Major uint64
}

type DidSaveSnapshot

type DidSaveSnapshot struct {
	MinorIndex uint64
}

type Event

type Event interface {
	// contains filtered or unexported methods
}

type FatalError

type FatalError struct {
	Err error
}

func (FatalError) Error

func (e FatalError) Error() string

func (FatalError) Unwrap

func (e FatalError) Unwrap() error

type WillChangeGlobals

type WillChangeGlobals struct {
	New, Old *core.GlobalValues
}

Jump to

Keyboard shortcuts

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