eventbus

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Publish

func Publish[T any](topic string, data T)

func Subscribe

func Subscribe[T any](topic string, fn func(data T))

Types

type Bus

type Bus[T any] struct {
	Topic string
	Subs  map[string][]chan T
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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