v0.3.8-pre.006-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-store-desk/src/store_runtime.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Composite-selected Store readiness, status and bounded shutdown lifecycle owned by Store Desk.
|
||||
|
||||
@@ -9,10 +9,10 @@ pub(crate) struct StoreStartup {
|
||||
diagnostic: std::option::Option<crate::CommandErrorDto>,
|
||||
network: std::option::Option<String>,
|
||||
profile_id: std::option::Option<String>,
|
||||
runtime: std::option::Option<StoreRuntime>,
|
||||
runtime: std::option::Option<crate::StoreRuntime>,
|
||||
}
|
||||
|
||||
impl StoreStartup {
|
||||
impl crate::StoreStartup {
|
||||
/// Builds a fresh backend-neutral runtime/health projection for the Overview screen.
|
||||
pub(crate) async fn status(&self) -> crate::StoreRuntimeStatusDto {
|
||||
let runtime = self.runtime.as_ref();
|
||||
@@ -51,7 +51,7 @@ pub(crate) struct StoreRuntime {
|
||||
store: tokio::sync::RwLock<std::option::Option<ksp_store_lib::Store>>,
|
||||
}
|
||||
|
||||
impl StoreRuntime {
|
||||
impl crate::StoreRuntime {
|
||||
/// Builds one fresh safe Store status from the retained facade without exposing backend connection details.
|
||||
pub(crate) async fn status(&self) -> crate::StoreRuntimeStatusDto {
|
||||
let locked = self.store.read().await;
|
||||
@@ -128,7 +128,7 @@ impl StoreRuntime {
|
||||
}
|
||||
|
||||
/// Resolves the composite Store target, opens Store through the facade and captures one initial readiness probe.
|
||||
pub(crate) async fn initialize_store(management: &ksp_config_lib::ConfigManagement) -> StoreStartup {
|
||||
pub(crate) async fn initialize_store(management: &ksp_config_lib::ConfigManagement) -> crate::StoreStartup {
|
||||
let environment = ksp_config_lib::ConfigEnvironment::load();
|
||||
let environment = match environment {
|
||||
std::result::Result::Ok(value) => value,
|
||||
@@ -189,12 +189,12 @@ pub(crate) async fn initialize_store(management: &ksp_config_lib::ConfigManageme
|
||||
pending_migration_count = health.pending_migration_count(),
|
||||
"initialized Store Desk Store from composite-managed configuration"
|
||||
);
|
||||
return StoreStartup {
|
||||
return crate::StoreStartup {
|
||||
backend_kind: std::option::Option::Some(backend_kind),
|
||||
diagnostic: non_ready_health_diagnostic(&health),
|
||||
network: std::option::Option::Some(network),
|
||||
profile_id: std::option::Option::Some(profile_id.clone()),
|
||||
runtime: std::option::Option::Some(StoreRuntime { profile_id, store: tokio::sync::RwLock::new(std::option::Option::Some(store)) }),
|
||||
runtime: std::option::Option::Some(crate::StoreRuntime { profile_id, store: tokio::sync::RwLock::new(std::option::Option::Some(store)) }),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ fn unavailable_startup(
|
||||
backend_kind: std::option::Option<String>,
|
||||
network: std::option::Option<String>,
|
||||
error: ksp_core_lib::Error,
|
||||
) -> StoreStartup {
|
||||
) -> crate::StoreStartup {
|
||||
let diagnostic = crate::CommandErrorDto::from_error(&error);
|
||||
ksp_logging_lib::warn!(
|
||||
target: crate::TRACING_TARGET,
|
||||
@@ -239,7 +239,7 @@ fn unavailable_startup(
|
||||
error_code = diagnostic.code.as_str(),
|
||||
"Store Desk Store readiness is unavailable; keeping desktop shell available"
|
||||
);
|
||||
return StoreStartup {
|
||||
return crate::StoreStartup {
|
||||
backend_kind,
|
||||
diagnostic: std::option::Option::Some(diagnostic),
|
||||
network,
|
||||
|
||||
Reference in New Issue
Block a user