MCPcopy Index your code
hub / github.com/riverqueue/river / New

Function New

internal/notifier/notifier.go:98–107  ·  view source on GitHub ↗
(archetype *baseservice.Archetype, listener riverdriver.Listener)

Source from the content-addressed store, hash-verified

96}
97
98func New(archetype *baseservice.Archetype, listener riverdriver.Listener) *Notifier {
99 notifier := baseservice.Init(archetype, &Notifier{
100 listener: listener,
101 notificationBuf: make(chan *riverdriver.Notification, 1000),
102 waitInterruptChan: make(chan func(), 10),
103
104 subscriptions: make(map[NotificationTopic][]*Subscription),
105 })
106 return notifier
107}
108
109func (n *Notifier) Start(ctx context.Context) error {
110 ctx, shouldStart, started, stopped := n.StartInit(ctx)

Callers 5

NewClientFunction · 0.92
TestElector_WithNotifierFunction · 0.92
TestNotifierFunction · 0.70

Calls 1

InitFunction · 0.92