diff options
Diffstat (limited to 'gateway/src/config.rs')
| -rw-r--r-- | gateway/src/config.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gateway/src/config.rs b/gateway/src/config.rs new file mode 100644 index 0000000..6dc2c28 --- /dev/null +++ b/gateway/src/config.rs @@ -0,0 +1,33 @@ +use enumflags2::BitFlags; +use crate::client::structs::Intents; +use serde::Deserialize; + +/// Config for the client connection. +#[derive(Debug, Deserialize, Clone, Default)] +pub struct ClusterClientConfig { + pub token: String, + pub large_threshold: Option<u64>, + pub intents: BitFlags<Intents> +} + +/// Configuration for the cluster manager +#[derive(Debug, Deserialize, Clone, Default)] +pub struct ClusterClientSharding { + pub cluster_size: i64, + pub cluster_id: i64, + pub shard_count: i64 +} + +/// Configuration for the output of the cluster +#[derive(Debug, Deserialize, Clone, Default)] +pub struct ClusterRelay { + pub relay_instances: i64 +} + +/// Configuration for the gateway component +#[derive(Debug, Deserialize, Clone, Default)] +pub struct Config { + pub discord: ClusterClientConfig, + pub clustering: ClusterClientSharding, + pub relaying: ClusterRelay, +} |
