event_bus

package
v0.3.26 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventBeforeRPCStart  = "before-rpc-start"
	EventRPCStarted      = "rpc-started"
	EventBeforeHttpStart = "before-http-start"
	EventHttpStarted     = "http-started"
)

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 (b EventBus) Emit(topic string, arg interface{})

func (EventBus) Off

func (b EventBus) Off(topic string)

func (EventBus) On

func (b EventBus) On(topic string, handler Handler)

type Handler

type Handler func(arg interface{})

Jump to

Keyboard shortcuts

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