MCPcopy Create free account
hub / github.com/coder/coder / WithNotificationsEnqueuer

Function WithNotificationsEnqueuer

coderd/database/dbpurge/dbpurge.go:87–92  ·  view source on GitHub ↗

WithNotificationsEnqueuer sets the enqueuer used for digest notifications. Defaults to notifications.NewNoopEnqueuer(). Panics if e is nil: a nil enqueuer would NPE on the first dispatch tick, and failing fast at option-apply time surfaces the misuse at startup rather than minutes later.

(e notifications.Enqueuer)

Source from the content-addressed store, hash-verified

85// and failing fast at option-apply time surfaces the misuse at
86// startup rather than minutes later.
87func WithNotificationsEnqueuer(e notifications.Enqueuer) Option {
88 if e == nil {
89 panic("developer error: WithNotificationsEnqueuer called with nil enqueuer")
90 }
91 return func(i *instance) { i.enqueuer = e }
92}
93
94// New creates a new periodically purging database instance.
95// Callers must Close the returned instance.

Callers 2

ServerMethod · 0.92

Calls

no outgoing calls

Tested by 1