mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 16:50:10 +00:00
fix(gateway): move shard state updates, store in hashmap
This commit is contained in:
parent
727f378577
commit
b4e3bbbac2
4 changed files with 114 additions and 39 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue