Versions in this module Expand all Collapse all v0 v0.31.5 Apr 16, 2019 Changes in this version + var ErrAlreadySubscribed = errors.New("already subscribed") + var ErrOutOfCapacity = errors.New("client is not pulling messages fast enough") + var ErrSubscriptionNotFound = errors.New("subscription not found") + var ErrUnsubscribed = errors.New("client unsubscribed") + type Message struct + func NewMessage(data interface{}, tags map[string]string) Message + func (msg Message) Data() interface{} + func (msg Message) Tags() map[string]string + type Option func(*Server) + func BufferCapacity(cap int) Option + type Query interface + Matches func(tags map[string]string) bool + String func() string + type Server struct + func NewServer(options ...Option) *Server + func (s *Server) BufferCapacity() int + func (s *Server) NumClientSubscriptions(clientID string) int + func (s *Server) NumClients() int + func (s *Server) OnReset() error + func (s *Server) OnStart() error + func (s *Server) OnStop() + func (s *Server) Publish(ctx context.Context, msg interface{}) error + func (s *Server) PublishWithTags(ctx context.Context, msg interface{}, tags map[string]string) error + func (s *Server) Subscribe(ctx context.Context, clientID string, query Query, outCapacity ...int) (*Subscription, error) + func (s *Server) SubscribeUnbuffered(ctx context.Context, clientID string, query Query) (*Subscription, error) + func (s *Server) Unsubscribe(ctx context.Context, clientID string, query Query) error + func (s *Server) UnsubscribeAll(ctx context.Context, clientID string) error + type Subscription struct + func NewSubscription(outCapacity int) *Subscription + func (s *Subscription) Cancelled() <-chan struct{} + func (s *Subscription) Err() error + func (s *Subscription) Out() <-chan Message