eventscope

package
v0.0.0-...-a532a67 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() app.EventScope

NewEventScope create new instance of event scope

func NewChild

func NewChild(parent app.EventScope) app.EventScope

NewChild create new instance of event scope

Types

type ChildEventScope

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

ChildEventScope is event scope interface

func (*ChildEventScope) On

func (es *ChildEventScope) On(eID interface{}, callback app.EventCallback)

On connect a function to event

func (*ChildEventScope) Trigger

func (es *ChildEventScope) Trigger(eID interface{}, data interface{}) (err error)

Trigger run all function connected to event

type EventScope

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

EventScope is event scope interface

func (*EventScope) On

func (es *EventScope) On(eID interface{}, callback app.EventCallback)

On connect a function to event

func (*EventScope) Trigger

func (es *EventScope) Trigger(eID interface{}, data interface{}) error

Trigger run all function connected to event

Jump to

Keyboard shortcuts

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