Document types of the replication streams
This commit is contained in:
parent
96b9b6c127
commit
ad544c803a
|
@ -36,34 +36,82 @@ logger = logging.getLogger(__name__)
|
||||||
MAX_EVENTS_BEHIND = 10000
|
MAX_EVENTS_BEHIND = 10000
|
||||||
|
|
||||||
|
|
||||||
EventStreamRow = namedtuple("EventStreamRow",
|
EventStreamRow = namedtuple("EventStreamRow", (
|
||||||
("event_id", "room_id", "type", "state_key", "redacts"))
|
"event_id", # str
|
||||||
BackfillStreamRow = namedtuple("BackfillStreamRow",
|
"room_id", # str
|
||||||
("event_id", "room_id", "type", "state_key", "redacts"))
|
"type", # str
|
||||||
PresenceStreamRow = namedtuple("PresenceStreamRow",
|
"state_key", # str, optional
|
||||||
("user_id", "state", "last_active_ts",
|
"redacts", # str, optional
|
||||||
"last_federation_update_ts", "last_user_sync_ts",
|
))
|
||||||
"status_msg", "currently_active"))
|
BackfillStreamRow = namedtuple("BackfillStreamRow", (
|
||||||
TypingStreamRow = namedtuple("TypingStreamRow",
|
"event_id", # str
|
||||||
("room_id", "user_ids"))
|
"room_id", # str
|
||||||
ReceiptsStreamRow = namedtuple("ReceiptsStreamRow",
|
"type", # str
|
||||||
("room_id", "receipt_type", "user_id", "event_id",
|
"state_key", # str, optional
|
||||||
"data"))
|
"redacts", # str, optional
|
||||||
PushRulesStreamRow = namedtuple("PushRulesStreamRow", ("user_id",))
|
))
|
||||||
PushersStreamRow = namedtuple("PushersStreamRow",
|
PresenceStreamRow = namedtuple("PresenceStreamRow", (
|
||||||
("user_id", "app_id", "pushkey", "deleted",))
|
"user_id", # str
|
||||||
CachesStreamRow = namedtuple("CachesStreamRow",
|
"state", # str
|
||||||
("cache_func", "keys", "invalidation_ts",))
|
"last_active_ts", # int
|
||||||
PublicRoomsStreamRow = namedtuple("PublicRoomsStreamRow",
|
"last_federation_update_ts", # int
|
||||||
("room_id", "visibility", "appservice_id",
|
"last_user_sync_ts", # int
|
||||||
"network_id",))
|
"status_msg", # str
|
||||||
DeviceListsStreamRow = namedtuple("DeviceListsStreamRow", ("user_id", "destination",))
|
"currently_active", # bool
|
||||||
ToDeviceStreamRow = namedtuple("ToDeviceStreamRow", ("entity",))
|
))
|
||||||
FederationStreamRow = namedtuple("FederationStreamRow", ("type", "data",))
|
TypingStreamRow = namedtuple("TypingStreamRow", (
|
||||||
TagAccountDataStreamRow = namedtuple("TagAccountDataStreamRow",
|
"room_id", # str
|
||||||
("user_id", "room_id", "data"))
|
"user_ids", # list(str)
|
||||||
AccountDataStreamRow = namedtuple("AccountDataStream",
|
))
|
||||||
("user_id", "room_id", "data_type", "data"))
|
ReceiptsStreamRow = namedtuple("ReceiptsStreamRow", (
|
||||||
|
"room_id", # str
|
||||||
|
"receipt_type", # str
|
||||||
|
"user_id", # str
|
||||||
|
"event_id", # str
|
||||||
|
"data", # dict
|
||||||
|
))
|
||||||
|
PushRulesStreamRow = namedtuple("PushRulesStreamRow", (
|
||||||
|
"user_id", # str
|
||||||
|
))
|
||||||
|
PushersStreamRow = namedtuple("PushersStreamRow", (
|
||||||
|
"user_id", # str
|
||||||
|
"app_id", # str
|
||||||
|
"pushkey", # str
|
||||||
|
"deleted", # bool
|
||||||
|
))
|
||||||
|
CachesStreamRow = namedtuple("CachesStreamRow", (
|
||||||
|
"cache_func", # str
|
||||||
|
"keys", # list(str)
|
||||||
|
"invalidation_ts", # int
|
||||||
|
))
|
||||||
|
PublicRoomsStreamRow = namedtuple("PublicRoomsStreamRow", (
|
||||||
|
"room_id", # str
|
||||||
|
"visibility", # str
|
||||||
|
"appservice_id", # str, optional
|
||||||
|
"network_id", # str, optional
|
||||||
|
))
|
||||||
|
DeviceListsStreamRow = namedtuple("DeviceListsStreamRow", (
|
||||||
|
"user_id", # str
|
||||||
|
"destination", # str
|
||||||
|
))
|
||||||
|
ToDeviceStreamRow = namedtuple("ToDeviceStreamRow", (
|
||||||
|
"entity", # str
|
||||||
|
))
|
||||||
|
FederationStreamRow = namedtuple("FederationStreamRow", (
|
||||||
|
"type", # str
|
||||||
|
"data", # dict
|
||||||
|
))
|
||||||
|
TagAccountDataStreamRow = namedtuple("TagAccountDataStreamRow", (
|
||||||
|
"user_id", # str
|
||||||
|
"room_id", # str
|
||||||
|
"data", # dict
|
||||||
|
))
|
||||||
|
AccountDataStreamRow = namedtuple("AccountDataStream", (
|
||||||
|
"user_id", # str
|
||||||
|
"room_id", # str
|
||||||
|
"data_type", # str
|
||||||
|
"data", # dict
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
class Stream(object):
|
class Stream(object):
|
||||||
|
|
Loading…
Reference in New Issue