events

package
v0.0.0-...-124f97e Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data any

type Event

type Event[T Data] struct {
	// contains filtered or unexported fields
}

func New

func New[T Data]() Event[T]

func (Event[T]) Emit

func (e Event[T]) Emit(event T)

func (*Event[T]) Subscribe

func (e *Event[T]) Subscribe(handler Handler[T]) func()

type Handler

type Handler[T Data] func(T)

Jump to

Keyboard shortcuts

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