event

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(eventName string, handler Handler)

func Trigger

func Trigger(eventName string, data interface{}) (any, error)

Types

type Event

type Event struct {
	Name string
	Data any
}

type Handler

type Handler func(e Event) (any, error)

type IEvent added in v1.0.1

type IEvent interface {
	Register()
}

Jump to

Keyboard shortcuts

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