eventbus

package
v0.0.0-...-ace9e8d Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

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

func NewEventBus

func NewEventBus() *EventBus

func (*EventBus) Emit

func (e *EventBus) Emit(evt string, data interface{})

func (*EventBus) Register

func (e *EventBus) Register(evt string, sub Subscriber)

func (*EventBus) Unregister

func (e *EventBus) Unregister(evt string, sub Subscriber)

type Subscriber

type Subscriber interface {
	OnEvent(evt string, data interface{})
}

Jump to

Keyboard shortcuts

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