event

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args []interface{}

type EventHandler

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

func NewEventHandler

func NewEventHandler() *EventHandler

Constructor

func (*EventHandler) CountEventListeners

func (eventHandler *EventHandler) CountEventListeners(name string) int

func (*EventHandler) Emit

func (eventHandler *EventHandler) Emit(name string, data Args)

func (*EventHandler) Listen

func (eventHandler *EventHandler) Listen(name string, callback func(Args))

func (*EventHandler) ListenAndWait

func (eventHandler *EventHandler) ListenAndWait(name string) Args

func (*EventHandler) ListenOnce

func (eventHandler *EventHandler) ListenOnce(name string, callback func(Args))

Standard methods

func (*EventHandler) RemoveAllEventListeners

func (eventHandler *EventHandler) RemoveAllEventListeners()

func (*EventHandler) RemoveEventListeners

func (eventHandler *EventHandler) RemoveEventListeners(name string)

type EventListener

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

Jump to

Keyboard shortcuts

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