refactor: replace ConfigSource with bool parameter (#1516)

This commit is contained in:
Mg Pig
2025-11-04 13:48:10 +08:00
committed by GitHub
parent 6bb2fd9a15
commit 89cc75f674
8 changed files with 51 additions and 102 deletions

View File

@@ -4,7 +4,6 @@ use dashmap::DashMap;
use easytier::{
common::config::{ConfigLoader as _, TomlConfigLoader},
instance_manager::NetworkInstanceManager,
launcher::ConfigSource,
};
static INSTANCE_NAME_ID_MAP: once_cell::sync::Lazy<DashMap<String, uuid::Uuid>> =
@@ -129,7 +128,7 @@ pub unsafe extern "C" fn run_network_instance(cfg_str: *const std::ffi::c_char)
return -1;
}
let instance_id = match INSTANCE_MANAGER.run_network_instance(cfg, ConfigSource::FFI) {
let instance_id = match INSTANCE_MANAGER.run_network_instance(cfg, false) {
Ok(id) => id,
Err(e) => {
set_error_msg(&format!("failed to start instance: {}", e));