Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationTopic ¶
type NotificationTopic string
const ( NotificationTopicInsert NotificationTopic = "river_insert" NotificationTopicLeadership NotificationTopic = "river_leadership" NotificationTopicJobControl NotificationTopic = "river_job_control" )
type Notifier ¶
type Notifier struct { baseservice.BaseService // contains filtered or unexported fields }
func New ¶
func New(archetype *baseservice.Archetype, connConfig *pgx.ConnConfig, statusChangeFunc func(componentstatus.Status), logger *slog.Logger) *Notifier
func (*Notifier) Listen ¶
func (n *Notifier) Listen(topic NotificationTopic, notifyFunc NotifyFunc) *Subscription
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()
Click to show internal directories.
Click to hide internal directories.