from __future__ import annotations

from dataclasses import dataclass, field
import time
from typing import Any


@dataclass
class ServiceEvent:
    service: str
    event_type: str
    payload: Any
    tags: dict[str, str] = field(default_factory=dict)
    source: str | None = None
    timestamp: float = field(default_factory=time.time)


__all__ = ["ServiceEvent"]
