Files
monlet/server/monlet_server/services/notifiers/base.py
2026-05-27 10:01:59 +04:00

18 lines
342 B
Python

from __future__ import annotations
from dataclasses import dataclass
from typing import Protocol
@dataclass(frozen=True)
class DeliveryResult:
ok: bool
permanent: bool = False
error: str | None = None
class Notifier(Protocol):
name: str
async def deliver(self, event_type: str, payload: dict) -> DeliveryResult: ...