event

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	Kind() EventKind
	Source() string
	fmt.Stringer
}

type EventBus

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

func NewEventBus

func NewEventBus() *EventBus

func (*EventBus) Close

func (bus *EventBus) Close()

func (*EventBus) Drain

func (bus *EventBus) Drain()

func (*EventBus) Publish

func (bus *EventBus) Publish(event Event)

func (*EventBus) Subscribe

func (bus *EventBus) Subscribe(callback func(event Event))

type EventKind

type EventKind uint8
const (
	LogDebug EventKind = iota
	LogInfo
	LogWarning
	LogError
	PrintConsole
	LoaderUpdate
	LoaderStop
)

func (EventKind) String

func (e EventKind) String() string

Jump to

Keyboard shortcuts

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