58 lines
1.2 KiB
Python
58 lines
1.2 KiB
Python
"""
|
|
User Container Event System
|
|
|
|
Publishes events to the gateway via dual ZMQ patterns:
|
|
- XPUB for informational events (fire-and-forget to active sessions)
|
|
- DEALER for critical events (guaranteed delivery with ack)
|
|
|
|
See doc/protocol.md and doc/user_container_events.md for details.
|
|
"""
|
|
|
|
from .types import (
|
|
# Enums
|
|
EventType,
|
|
Priority,
|
|
ChannelType,
|
|
AckStatus,
|
|
# Message types
|
|
ChannelPreference,
|
|
DeliverySpec,
|
|
UserEvent,
|
|
EventAck,
|
|
# Serialization
|
|
MSG_TYPE_USER_EVENT,
|
|
MSG_TYPE_EVENT_ACK,
|
|
serialize_user_event,
|
|
deserialize_user_event,
|
|
serialize_event_ack,
|
|
deserialize_event_ack,
|
|
)
|
|
|
|
from .publisher import EventPublisher
|
|
|
|
from .pending_store import PendingStore
|
|
|
|
__all__ = [
|
|
# Enums
|
|
"EventType",
|
|
"Priority",
|
|
"ChannelType",
|
|
"AckStatus",
|
|
# Message types
|
|
"ChannelPreference",
|
|
"DeliverySpec",
|
|
"UserEvent",
|
|
"EventAck",
|
|
# Serialization
|
|
"MSG_TYPE_USER_EVENT",
|
|
"MSG_TYPE_EVENT_ACK",
|
|
"serialize_user_event",
|
|
"deserialize_user_event",
|
|
"serialize_event_ack",
|
|
"deserialize_event_ack",
|
|
# Publisher
|
|
"EventPublisher",
|
|
# Storage
|
|
"PendingStore",
|
|
]
|