diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-09-22 16:49:51 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-09-22 16:49:51 +0800 |
| commit | b0ae3b3b5c8b005b3f7cb2b26b17ae521a38c669 (patch) | |
| tree | ecb8883f1c53ea1602d50c8a57d59d8d3b2a177c /crates/env/src/local | |
| parent | 23f09dabe279233a960786d5048266de7f216c12 (diff) | |
Modify the file structure
Diffstat (limited to 'crates/env/src/local')
| -rw-r--r-- | crates/env/src/local/config.rs | 37 | ||||
| -rw-r--r-- | crates/env/src/local/manage.rs | 1 |
2 files changed, 0 insertions, 38 deletions
diff --git a/crates/env/src/local/config.rs b/crates/env/src/local/config.rs deleted file mode 100644 index ddb7dd0..0000000 --- a/crates/env/src/local/config.rs +++ /dev/null @@ -1,37 +0,0 @@ -use cfg_file::ConfigFile; -use serde::{Deserialize, Serialize}; -use std::net::SocketAddr; - -use crate::constants::CLIENT_FILE_WORKSPACE; -use crate::constants::PORT; - -#[derive(Serialize, Deserialize, ConfigFile)] -#[cfg_file(path = CLIENT_FILE_WORKSPACE)] -pub struct LocalConfig { - /// The vault address, representing the upstream address of the local workspace, - /// to facilitate timely retrieval of new updates from the upstream source. - vault_addr: SocketAddr, -} - -impl Default for LocalConfig { - fn default() -> Self { - Self { - vault_addr: SocketAddr::V4(std::net::SocketAddrV4::new( - std::net::Ipv4Addr::new(127, 0, 0, 1), - PORT, - )), - } - } -} - -impl LocalConfig { - /// Set the vault address. - pub fn set_vault_addr(&mut self, addr: SocketAddr) { - self.vault_addr = addr; - } - - /// Get the vault address. - pub fn vault_addr(&self) -> SocketAddr { - self.vault_addr - } -} diff --git a/crates/env/src/local/manage.rs b/crates/env/src/local/manage.rs deleted file mode 100644 index 8b13789..0000000 --- a/crates/env/src/local/manage.rs +++ /dev/null @@ -1 +0,0 @@ - |
