feat(notification): add Resend quota gate and waiting-for-reset state

This commit is contained in:
shira committed 2026-10-06 11:50:38 +03:00
1 parent 3b917befa9
commit b856d4ff54
40 files changed
+4116 -48

No files matched your search

@@ -65,6 +65,13 @@ type Sender struct {
const redactionMarker = "[redacted Resend API key]"
// IdempotencyWindow is how long Resend keeps an Idempotency-Key and answers
// a repeated request under it with the original result instead of sending
// again: 24 hours, per the Resend API documentation. Bootstrap passes it to
// notification.NewQuotaGate, so a retry inside the window does not count
// against the quota a second time.
const IdempotencyWindow = 24 * time.Hour
// credential holds the Authorization header value. It redacts itself in fmt
// and slog output in case it is ever printed directly.
type credential struct {