Documentation
¶
Overview ¶
Package scheduler (piece ⑪) is Exhale's clock. It plans reminders, sleeps until the next one is due and delivers it, with retries and catch-up after downtime. No cron: the next wake-up comes from the outbox itself (ADR 0003).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deliverer ¶
type Deliverer interface {
Deliver(ctx context.Context, item app.OutboxItem) error
}
Deliverer sends one outbox item (the action layer implements it).
type Scheduler ¶
type Scheduler struct {
// MaxSleep bounds every sleep so that clock jumps and new days are noticed.
MaxSleep time.Duration
// contains filtered or unexported fields
}
Scheduler is a supervised service.
func New ¶
New returns a scheduler. deliver may be nil (reminders are planned but not sent, e.g. when no channel is configured).
Click to show internal directories.
Click to hide internal directories.