Versions in this module Expand all Collapse all v0 v0.20.8 Jan 23, 2024 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 + Send func(m Message) + Set func(key string, value any) + Subscribe func(subs ...string) + Subscriptions func(prefixes ...string) map[string]SubscriptionOptions + Unset func(key string) + 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) Send(m Message) + func (c *DefaultClient) Set(key string, value any) + func (c *DefaultClient) Subscribe(subs ...string) + func (c *DefaultClient) Subscriptions(prefixes ...string) map[string]SubscriptionOptions + func (c *DefaultClient) Unset(key string) + func (c *DefaultClient) Unsubscribe(subs ...string) + type Message struct + Data []byte + Name string + type SubscriptionOptions struct + Headers map[string]any + Query map[string]any