events

package
v0.8.0-beta Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 5 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))

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)

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
}

Jump to

Keyboard shortcuts

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