broker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const MaxChannelSize = 512

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker[T any] struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewBroker

func NewBroker[T any]() *Broker[T]

func (*Broker[T]) Publish

func (b *Broker[T]) Publish(msg *T)

func (*Broker[T]) Subscribe

func (b *Broker[T]) Subscribe() chan *T

func (*Broker[T]) Unsubscribe

func (b *Broker[T]) Unsubscribe(msgCh chan *T)

Jump to

Keyboard shortcuts

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