startup

package
v5.3.3-pre13 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: AGPL-3.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FireAfter

func FireAfter(typ string)

FireAfter 触发后置事件

func FireBefore

func FireBefore(typ string)

FireBefore 触发前置事件

func OnAfter

func OnAfter(typ string, eventFunc EventFunc)

OnAfter 监听后置事件

func OnBefore

func OnBefore(typ string, eventFunc EventFunc)

OnBefore 监听前置事件

func TypeList

func TypeList() []string

TypeList 事件类型列表

Types

type Event

type Event struct {
	Before []EventFunc
	After  []EventFunc
}

func MustGetEvent

func MustGetEvent(typ string) *Event

MustGetEvent 获取事件

func NewEvent

func NewEvent() *Event

func (*Event) AddAfter

func (e *Event) AddAfter(fn EventFunc) *Event

func (*Event) AddBefore

func (e *Event) AddBefore(fn EventFunc) *Event

func (*Event) RunAfter

func (e *Event) RunAfter() *Event

func (*Event) RunBefore

func (e *Event) RunBefore() *Event

type EventFunc

type EventFunc func()

Jump to

Keyboard shortcuts

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