event_broker

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 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 Broker

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

func New

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

func (*Broker[T]) Publish

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

func (*Broker[T]) Start

func (b *Broker[T]) Start()

func (*Broker[T]) Stop

func (b *Broker[T]) Stop()

func (*Broker[T]) Subscribe

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

func (*Broker[T]) Unsubscribe

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

type IBroker

type IBroker interface {
	Start()
	Stop()
	Publish(any)
	Subscribe() chan any
}

Jump to

Keyboard shortcuts

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