event

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSys

func NewSys(option ...Option) (err error)

func OnInit

func OnInit(config map[string]interface{}, option ...Option) (err error)

func Register

func Register(eId core.Event_Key, f interface{}) (err error)

func RegisterGO

func RegisterGO(eId core.Event_Key, f interface{}) (err error)

func RemoveEvent

func RemoveEvent(eId core.Event_Key, f interface{}) (err error)

func TriggerEvent

func TriggerEvent(eId core.Event_Key, agr ...interface{})

Types

type EventSys

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

func (*EventSys) Register

func (this *EventSys) Register(eId core.Event_Key, f interface{}) (err error)

func (*EventSys) RegisterGO

func (this *EventSys) RegisterGO(eId core.Event_Key, f interface{}) (err error)

func (*EventSys) RemoveEvent

func (this *EventSys) RemoveEvent(eId core.Event_Key, f interface{}) (err error)

移除事件

func (*EventSys) TriggerEvent

func (this *EventSys) TriggerEvent(eId core.Event_Key, agr ...interface{})

触发

type FunctionInfo

type FunctionInfo struct {
	Function  reflect.Value
	Goroutine bool
}

type IEventSys

type IEventSys interface {
	Register(eId core.Event_Key, f interface{}) (err error)
	RegisterGO(eId core.Event_Key, f interface{}) (err error)
	RemoveEvent(eId core.Event_Key, f interface{}) (err error)
	TriggerEvent(eId core.Event_Key, agr ...interface{})
}

type Option

type Option func(*Options)

type Options

type Options struct{}

Jump to

Keyboard shortcuts

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