corvix.notifications.targets.base¶
NotificationTarget protocol — the extension point for all delivery channels.
Classes¶
Delivery channel for notification events. |
Module Contents¶
- class corvix.notifications.targets.base.NotificationTarget[source][source]¶
Bases:
ProtocolDelivery channel for notification events.
Implement this protocol to add a new notification channel (browser push, Slack, webhook, email, …).
deliveris only called when there is at least one event to process.Errors raised inside
deliverare caught by the dispatcher and surfaced inDeliveryResult.errors; they never propagate to the poll loop.- deliver(events: list[corvix.notifications.models.NotificationEvent]) corvix.notifications.models.DeliveryResult[source][source]¶
Deliver events to this channel.
Must return a
DeliveryResulteven on partial failure. Implementations are responsible for their own rate-limiting, retries, and idempotency.