event

package
v0.0.0-...-0158116 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MEvent

type MEvent struct {
	EMap map[string][]MHandler
}

func NewMEvent

func NewMEvent() *MEvent

func (*MEvent) On

func (mine *MEvent) On(name string, handler MHandler)

func (*MEvent) Trigger

func (mine *MEvent) Trigger(name string, p params.IPayload)

type MHandler

type MHandler interface {
	Execute(p params.IPayload)
}

type MyCar

type MyCar struct {
}

实现handler

func (*MyCar) Execute

func (mine *MyCar) Execute(p params.IPayload)

type MyPhone

type MyPhone struct {
}

实现handler

func (*MyPhone) Execute

func (mine *MyPhone) Execute(p params.IPayload)

Jump to

Keyboard shortcuts

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