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)
| 85 | // and failing fast at option-apply time surfaces the misuse at |
| 86 | // startup rather than minutes later. |
| 87 | func 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. |
no outgoing calls