Versions in this module Expand all Collapse all v0 v0.1.2 Feb 14, 2021 Changes in this version + var ErrEmptyTopics = errors.New("empty topics") type Subscription + func NewSubscription(subscriber types.Client) *Subscription + func (s *Subscription) ID() string v0.1.1 Jan 1, 2021 Changes in this version + type DocEvent struct + DocKey string + Publisher *time.ActorID + Type types.EventType + type PubSub struct + func New() *PubSub + func (m *PubSub) Publish(publisher *time.ActorID, topic string, event DocEvent) + func (m *PubSub) Subscribe(subscriber *time.ActorID, topics []string) (*Subscription, map[string][]string, error) + func (m *PubSub) Unsubscribe(topics []string, sub *Subscription) + type Subscription struct + func (s *Subscription) Close() + func (s *Subscription) Events() <-chan DocEvent + func (s *Subscription) Subscriber() *time.ActorID + func (s *Subscription) SubscriberID() string + type Subscriptions struct + func (s *Subscriptions) Add(sub *Subscription) + func (s *Subscriptions) Delete(id string) + func (s *Subscriptions) Map() map[string]*Subscription