Documentation ¶
Index ¶
- type LocalNotificationService
- func (lns *LocalNotificationService) Close() error
- func (lns *LocalNotificationService) CloseTopics(topics ...string) error
- func (lns *LocalNotificationService) Publish(msg any, wait, broadcast bool, topics ...string) error
- func (lns *LocalNotificationService) Subscribe(topics ...string) (chan any, error)
- func (lns *LocalNotificationService) Unsubscribe(ch chan any, topics ...string) error
- type Message
- type MessageProcessorFn
- type RemoteNotificationService
- func (rns *RemoteNotificationService) Close() error
- func (rns *RemoteNotificationService) CloseTopics(topics ...string) error
- func (rns *RemoteNotificationService) Publish(msg any, wait, broadcast bool, topics ...string) error
- func (rns *RemoteNotificationService) Subscribe(topics ...string) (chan any, error)
- func (rns *RemoteNotificationService) Unsubscribe(ch chan any, topics ...string) error
- type Service
- type ServiceCreatorFn
- type SubscriberProxy
- type WSDialerCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalNotificationService ¶
type LocalNotificationService struct {
// contains filtered or unexported fields
}
func NewLocalNotificationService ¶
func NewLocalNotificationService(capacity int) *LocalNotificationService
func (*LocalNotificationService) Close ¶
func (lns *LocalNotificationService) Close() error
func (*LocalNotificationService) CloseTopics ¶
func (lns *LocalNotificationService) CloseTopics(topics ...string) error
func (*LocalNotificationService) Publish ¶
func (lns *LocalNotificationService) Publish(msg any, wait, broadcast bool, topics ...string) error
func (*LocalNotificationService) Subscribe ¶
func (lns *LocalNotificationService) Subscribe(topics ...string) (chan any, error)
func (*LocalNotificationService) Unsubscribe ¶
func (lns *LocalNotificationService) Unsubscribe(ch chan any, topics ...string) error
type MessageProcessorFn ¶
type RemoteNotificationService ¶
type RemoteNotificationService struct {
// contains filtered or unexported fields
}
func NewRemoteNotificationService ¶
func NewRemoteNotificationService(dc WSDialerCreator, maxRedials int) (*RemoteNotificationService, error)
func (*RemoteNotificationService) Close ¶
func (rns *RemoteNotificationService) Close() error
func (*RemoteNotificationService) CloseTopics ¶
func (rns *RemoteNotificationService) CloseTopics(topics ...string) error
func (*RemoteNotificationService) Publish ¶
func (rns *RemoteNotificationService) Publish(msg any, wait, broadcast bool, topics ...string) error
func (*RemoteNotificationService) Subscribe ¶
func (rns *RemoteNotificationService) Subscribe(topics ...string) (chan any, error)
func (*RemoteNotificationService) Unsubscribe ¶
func (rns *RemoteNotificationService) Unsubscribe(ch chan any, topics ...string) error
type Service ¶
type Service interface { Publish(msg any, wait, broadcast bool, topics ...string) error Subscribe(topics ...string) (chan any, error) Unsubscribe(ch chan any, topics ...string) error CloseTopics(topics ...string) error io.Closer }
Service is an interface to Notification Service that enables different parts of the MetaLocker platform to publish and subscribe to events of interest, such as new ledger block generation, etc.
type ServiceCreatorFn ¶
type SubscriberProxy ¶
type SubscriberProxy struct {
// contains filtered or unexported fields
}
func NewSubscriberProxy ¶
func NewSubscriberProxy(id string, ns Service, ch chan any, fn MessageProcessorFn) *SubscriberProxy
func (*SubscriberProxy) Close ¶
func (sp *SubscriberProxy) Close()
Close will close the internal channel and stop receiving messages
type WSDialerCreator ¶
Click to show internal directories.
Click to hide internal directories.