corvix.notifications.targets.base

NotificationTarget protocol — the extension point for all delivery channels.

Classes

NotificationTarget

Delivery channel for notification events.

Module Contents

class corvix.notifications.targets.base.NotificationTarget[source][source]

Bases: Protocol

Delivery channel for notification events.

Implement this protocol to add a new notification channel (browser push, Slack, webhook, email, …). deliver is only called when there is at least one event to process.

Errors raised inside deliver are caught by the dispatcher and surfaced in DeliveryResult.errors; they never propagate to the poll loop.

property name: str[source][source]

Human-readable identifier used in logs and metrics.

deliver(events: list[corvix.notifications.models.NotificationEvent]) corvix.notifications.models.DeliveryResult[source][source]

Deliver events to this channel.

Must return a DeliveryResult even on partial failure. Implementations are responsible for their own rate-limiting, retries, and idempotency.