mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-18 05:12:02 +00:00
refactor: tighten ws batch typing and queue cleanup logging
This commit is contained in:
committed by
GitHub
parent
45158ff45b
commit
b66140bfd2
@@ -76,16 +76,26 @@ export interface SendMessageOptions {
|
||||
compress?: boolean;
|
||||
}
|
||||
|
||||
// Redis message type for cross-node communication
|
||||
export interface RedisMessage {
|
||||
type: "direct" | "direct-batch" | "broadcast";
|
||||
targetClientId?: string;
|
||||
excludeClientId?: string;
|
||||
message: WSMessage;
|
||||
messages?: {
|
||||
targetClientId: string;
|
||||
message: WSMessage;
|
||||
}[];
|
||||
fromNodeId: string;
|
||||
options?: SendMessageOptions;
|
||||
}
|
||||
// Redis message types for cross-node communication
|
||||
export type RedisMessage =
|
||||
| {
|
||||
type: "direct";
|
||||
targetClientId: string;
|
||||
message: WSMessage;
|
||||
fromNodeId: string;
|
||||
}
|
||||
| {
|
||||
type: "direct-batch";
|
||||
messages: {
|
||||
targetClientId: string;
|
||||
message: WSMessage;
|
||||
}[];
|
||||
fromNodeId: string;
|
||||
}
|
||||
| {
|
||||
type: "broadcast";
|
||||
excludeClientId?: string;
|
||||
message: WSMessage;
|
||||
fromNodeId: string;
|
||||
options?: SendMessageOptions;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user