simple

package
v0.0.0-...-6789dc4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: GPL-3.0, GPL-3.0 Imports: 6 Imported by: 1

Documentation

Overview

Package simple implements a simple broker for just one process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleBroker

type SimpleBroker struct {
	// contains filtered or unexported fields
}

SimpleBroker implements broker.Broker/BrokerSending for everything in just one process.

func NewSimpleBroker

func NewSimpleBroker(sto store.PendingStore, cfg broker.BrokerConfig, logger logger.Logger, currentStats *statistics.Statistics) *SimpleBroker

NewSimpleBroker makes a new SimpleBroker.

func (*SimpleBroker) Broadcast

func (b *SimpleBroker) Broadcast(chanId store.InternalChannelId)

Broadcast requests the broadcast for a channel.

func (*SimpleBroker) Register

Register registers a session with the broker. It feeds the session pending notifications as well.

func (*SimpleBroker) Running

func (b *SimpleBroker) Running() bool

Running returns whether ther broker is running.

func (*SimpleBroker) Start

func (b *SimpleBroker) Start()

Start starts the broker.

func (*SimpleBroker) Stop

func (b *SimpleBroker) Stop()

Stop stops the broker.

func (*SimpleBroker) Unicast

func (b *SimpleBroker) Unicast(chanIds ...store.InternalChannelId)

Unicast requests unicast for the channels.

func (*SimpleBroker) Unregister

func (b *SimpleBroker) Unregister(s broker.BrokerSession)

Unregister unregisters a session with the broker. Doesn't wait.

Jump to

Keyboard shortcuts

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