fix(gateway): move shard state updates, store in hashmap

This commit is contained in:
asleepyskye 2025-05-22 17:31:29 -04:00 committed by alyssa
parent 0167519804
commit e2acaf93be
4 changed files with 115 additions and 40 deletions

View file

@ -1,4 +1,4 @@
#[derive(serde::Serialize, serde::Deserialize, Clone, Default)]
#[derive(serde::Serialize, serde::Deserialize, Clone, Default, Debug)]
pub struct ShardState {
pub shard_id: i32,
pub up: bool,
@ -10,3 +10,9 @@ pub struct ShardState {
pub last_connection: i32,
pub cluster_id: Option<i32>,
}
pub enum ShardStateEvent {
Closed,
Heartbeat,
Other,
}