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

@@ -3,7 +3,6 @@ use std::sync::Arc;
use crate::{
common::config::ConfigLoader,
instance_manager::NetworkInstanceManager,
launcher::ConfigSource,
proto::{
api::manage::*,
rpc_types::{self, controller::BaseController},
@@ -47,7 +46,7 @@ impl WebClientService for InstanceManageRpcService {
if let Some(inst_id) = req.inst_id {
cfg.set_id(inst_id.into());
}
self.manager.run_network_instance(cfg, ConfigSource::Web)?;
self.manager.run_network_instance(cfg, true)?;
println!("instance {} started", id);
Ok(RunNetworkInstanceResponse {
inst_id: Some(id.into()),