callbacks

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback[V any] struct {
	// contains filtered or unexported fields
}

func New

func New[V any]() *Callback[V]

func (*Callback[V]) AddMessage

func (p *Callback[V]) AddMessage(msg V)

func (*Callback[V]) Subscribe added in v0.16.4

func (p *Callback[V]) Subscribe(name string, fn func(msg V) bool)

func (*Callback[V]) Unsubscribe added in v0.16.4

func (p *Callback[V]) Unsubscribe(name string) bool

Jump to

Keyboard shortcuts

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