event

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(param any)

Handler process event

type Instance added in v1.1.7

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

func New added in v1.1.7

func New() *Instance

func (*Instance) Has added in v1.1.7

func (instance *Instance) Has(eventName string) bool

Has return event exist

func (*Instance) Listen added in v1.1.7

func (instance *Instance) Listen(eventName string, handler Handler)

Listen register a sync event

func (*Instance) Trigger added in v1.1.7

func (instance *Instance) Trigger(eventName string, param any)

Trigger make event trigger with given name and params

func (*Instance) TriggerAsync added in v1.1.7

func (instance *Instance) TriggerAsync(eventName string, param any)

Jump to

Keyboard shortcuts

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