events

package
v1.40.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Events provides an event-like push-pull system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Post

func Post(eventType EventType, data any)

Trigger each event stored at the given event type.

func Subscribe

func Subscribe(eventType EventType, event Event)

Subscribe to a given event type with a given event.

Types

type Event

type Event func(any)

Type alias for an event to be called.

type EventManager

Type alias for a mapping of event types to a collection of events.

func NewEventManager

func NewEventManager() EventManager

Construct a new event manager. Returns a new event manager.

type EventType

type EventType gopolutils.StringEnum

Lookup name of an event.

Jump to

Keyboard shortcuts

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