pubsub

package
v0.1.3-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBroker

func NewBroker(id string) *broker

func NewSubscriber

func NewSubscriber(id string, messages chan *optimusv1.LogEvent) *subscriber

Types

type Broker

type Broker interface {
	AddSubscriber(Subscriber)
	Broadcast(*optimusv1.LogEvent)
}

type Subscriber

type Subscriber interface {
	Destruct()
	Signal(*optimusv1.LogEvent)
	GetID() string
}

type Subscribers

type Subscribers map[string]Subscriber

Jump to

Keyboard shortcuts

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