event

package
v0.0.0-...-b411c9a Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 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 DispatcherEvent

type DispatcherEvent struct {
	Event map[string][]Listener
}

func NewDispatcher

func NewDispatcher() DispatcherEvent

func (*DispatcherEvent) Dispatch

func (e *DispatcherEvent) Dispatch(eventName Event) error

func (*DispatcherEvent) Register

func (e *DispatcherEvent) Register(eventName string, listener Listener)

type Event

type Event interface {
	GetEventName() string
}

type Listener

type Listener interface {
	Process(event Event)
}

Jump to

Keyboard shortcuts

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