teaevents

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func On

func On(event EventType, f Handler)

add handlers

func Post

func Post(event EventInterface)

call handlers

Types

type ConfigChangedEvent

type ConfigChangedEvent struct {
}

func NewConfigChangedEvent

func NewConfigChangedEvent() *ConfigChangedEvent

func (*ConfigChangedEvent) Type

func (this *ConfigChangedEvent) Type() string

type EventInterface

type EventInterface interface {
	Type() string
}

type EventType

type EventType = string
const (
	EventTypeConfigChanged EventType = "EventTypeConfigChanged" // config changed
)
const (
	EventTypeReload EventType = "EventTypeReload" // reload system
)

type Handler

type Handler func(event EventInterface)

type ReloadEvent

type ReloadEvent struct {
}

func NewReloadEvent

func NewReloadEvent() *ReloadEvent

func (*ReloadEvent) Type

func (this *ReloadEvent) Type() string

Jump to

Keyboard shortcuts

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