events

package
v1.0.0-rc1-debug Latest Latest
Warning

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

Go to latest
Published: Jul 22, 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 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