Versions in this module Expand all Collapse all v1 v1.0.1 Sep 18, 2024 v1.0.0 May 17, 2024 Changes in this version + var ErrAlreadySubscribed = errors.New("already subscribed") + var ErrServerStopped = errors.New("pubsub server is stopped") + var ErrSubscriptionNotFound = errors.New("subscription not found") + var ErrTerminated = errors.New("subscription terminated by publisher") + var ErrUnsubscribed = errors.New("subscription removed by client") + type Message struct + func (msg Message) Data() types.EventData + func (msg Message) Events() []abci.Event + func (msg Message) LegacyData() types.LegacyEventData + func (msg Message) SubscriptionID() string + type Option func(*Server) + func BufferCapacity(cap int) Option + type Server struct + func NewServer(logger log.Logger, options ...Option) *Server + func (s *Server) BufferCapacity() int + func (s *Server) NumClientSubscriptions(clientID string) int + func (s *Server) NumClients() int + func (s *Server) Observe(ctx context.Context, observe func(Message) error, queries ...*query.Query) error + func (s *Server) OnStart(ctx context.Context) error + func (s *Server) OnStop() + func (s *Server) Publish(msg types.EventData) error + func (s *Server) PublishWithEvents(msg types.EventData, events []abci.Event) error + func (s *Server) SubscribeWithArgs(ctx context.Context, args SubscribeArgs) (*Subscription, error) + func (s *Server) Unsubscribe(ctx context.Context, args UnsubscribeArgs) error + func (s *Server) UnsubscribeAll(ctx context.Context, clientID string) error + func (s *Server) Wait() + type SubscribeArgs struct + ClientID string + Limit int + Query *query.Query + Quota int + type Subscription struct + func (s *Subscription) ID() string + func (s *Subscription) Next(ctx context.Context) (Message, error) + type UnsubscribeArgs struct + ID string + Query *query.Query + Subscriber string + func (args UnsubscribeArgs) Validate() error