Documentation ¶
Overview ¶
Package simple implements a simple broker for just one process.
Index ¶
- type SimpleBroker
- func (b *SimpleBroker) Broadcast(chanId store.InternalChannelId)
- func (b *SimpleBroker) Register(connect *protocol.ConnectMsg, track broker.SessionTracker) (broker.BrokerSession, error)
- func (b *SimpleBroker) Running() bool
- func (b *SimpleBroker) Start()
- func (b *SimpleBroker) Stop()
- func (b *SimpleBroker) Unicast(chanIds ...store.InternalChannelId)
- func (b *SimpleBroker) Unregister(s broker.BrokerSession)
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 ¶
func (b *SimpleBroker) Register(connect *protocol.ConnectMsg, track broker.SessionTracker) (broker.BrokerSession, error)
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) 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.
Click to show internal directories.
Click to hide internal directories.