Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationTopic ¶
type NotificationTopic string
const ( NotificationTopicControl NotificationTopic = "river_control" NotificationTopicInsert NotificationTopic = "river_insert" NotificationTopicLeadership NotificationTopic = "river_leadership" )
type Notifier ¶
type Notifier struct { baseservice.BaseService startstop.BaseStartStop // contains filtered or unexported fields }
func New ¶
func New(archetype *baseservice.Archetype, listener riverdriver.Listener) *Notifier
func (*Notifier) Listen ¶
func (n *Notifier) Listen(ctx context.Context, topic NotificationTopic, notifyFunc NotifyFunc) (*Subscription, error)
type NotifyFunc ¶
type NotifyFunc func(topic NotificationTopic, payload string)
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) Unlisten ¶
func (s *Subscription) Unlisten(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.