feat: add redis cache and fanout support

This commit is contained in:
richjohnrambo
2026-08-25 20:54:03 +08:00
parent 07376c70e3
commit f900a08a01
68 changed files with 3949 additions and 5696 deletions
+16 -16
View File
@@ -100,8 +100,8 @@ message SetDesc {
}
message SeqRange {
int32 low = 1;
int32 hi = 2;
int64 low = 1;
int64 hi = 2;
}
message GetOpts {
@@ -112,9 +112,9 @@ message GetOpts {
// Limit search results to one topic;
string topic = 3;
// Load messages with seq id equal or greater than this
int32 since_id = 4;
int64 since_id = 4;
// Load messages with seq id lower than this
int32 before_id = 5;
int64 before_id = 5;
// Maximum number of results to return
int32 limit = 6;
// Load messages by id or ranges of ids
@@ -292,7 +292,7 @@ message ClientNote {
// "kp" - typing notification, "call" - voice/video call
InfoNote what = 2;
// Server-issued message ID being reported
int32 seq_id = 3;
int64 seq_id = 3;
// Client's count of unread messages to report back to the server. Used in push notifications on iOS.
int32 unread = 4;
// Call event.
@@ -345,9 +345,9 @@ message TopicDesc {
int64 touched_at = 3;
DefaultAcsMode defacs = 4;
AccessMode acs = 5;
int32 seq_id = 6;
int32 read_id = 7;
int32 recv_id = 8;
int64 seq_id = 6;
int64 read_id = 7;
int64 recv_id = 8;
int32 del_id = 9;
bytes public = 10;
bytes private = 11;
@@ -370,8 +370,8 @@ message TopicSub {
bool online = 3;
AccessMode acs = 4;
int32 read_id = 5;
int32 recv_id = 6;
int64 read_id = 5;
int64 recv_id = 6;
bytes public = 7;
bytes trusted = 16; // 16!
bytes private = 8;
@@ -387,7 +387,7 @@ message TopicSub {
string topic = 10;
int64 touched_at = 11;
// ID of the last {data} message in a topic
int32 seq_id = 12;
int64 seq_id = 12;
// Messages are deleted up to this ID
int32 del_id = 13;
@@ -421,7 +421,7 @@ message ServerData {
int64 timestamp = 7;
// Timestamp when the message was deleted or 0. Milliseconds since the epoch 01/01/1970
int64 deleted_at = 3;
int32 seq_id = 4;
int64 seq_id = 4;
map<string, bytes> head = 5;
bytes content = 6;
}
@@ -449,7 +449,7 @@ message ServerPres {
}
What what = 3;
string user_agent = 4;
int32 seq_id = 5;
int64 seq_id = 5;
int32 del_id = 6;
repeated SeqRange del_seq = 7;
string target_user_id = 8;
@@ -475,7 +475,7 @@ message ServerInfo {
string topic = 1;
string from_user_id = 2;
InfoNote what = 3;
int32 seq_id = 4;
int64 seq_id = 4;
string src = 5;
CallEvent event = 6;
bytes payload = 7;
@@ -577,8 +577,8 @@ message SubscriptionEvent {
string user_id = 3;
int32 del_id = 4;
int32 read_id = 5;
int32 recv_id = 6;
int64 read_id = 5;
int64 recv_id = 6;
AccessMode mode = 7;