Versions in this module Expand all Collapse all v0 v0.16.0 Apr 28, 2023 Changes in this version + type Broker struct + func NewBroker() *Broker + func (b *Broker) ClientById(clientId string) (Client, error) + func (b *Broker) Clients() map[string]Client + func (b *Broker) Register(client Client) + func (b *Broker) Unregister(clientId string) + type Client interface + Channel func() chan Message + Discard func() + Get func(key string) any + HasSubscription func(sub string) bool + Id func() string + IsDiscarded func() bool + Set func(key string, value any) + Subscribe func(subs ...string) + Subscriptions func() map[string]struct{} + Unsubscribe func(subs ...string) + type DefaultClient struct + func NewDefaultClient() *DefaultClient + func (c *DefaultClient) Channel() chan Message + func (c *DefaultClient) Discard() + func (c *DefaultClient) Get(key string) any + func (c *DefaultClient) HasSubscription(sub string) bool + func (c *DefaultClient) Id() string + func (c *DefaultClient) IsDiscarded() bool + func (c *DefaultClient) Set(key string, value any) + func (c *DefaultClient) Subscribe(subs ...string) + func (c *DefaultClient) Subscriptions() map[string]struct{} + func (c *DefaultClient) Unsubscribe(subs ...string) + type Message struct + Data string + Name string