observer

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseManager

type BaseManager[T any] struct {
	Lst map[string][]Listener[T]
}

func (*BaseManager[T]) Add

func (m *BaseManager[T]) Add(n string, l Listener[T])

func (*BaseManager[T]) Invoke

func (m *BaseManager[T]) Invoke(n string, args Event[T])

type Event added in v0.3.3

type Event[T any] struct {
	Kind string
	Args T
}

type Listener

type Listener[T any] func(T)

type Manager

type Manager[T any] interface {
	Add(n string, l Listener[T])
}

Jump to

Keyboard shortcuts

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