v0.3.7-pre.005
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-backfill-desk/src/transport_runtime.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Composite-selected HTTP Transport readiness owned by Backfill Desk.
|
||||
|
||||
@@ -16,6 +16,16 @@ impl TransportRuntime {
|
||||
return self.profile_id.as_str();
|
||||
}
|
||||
|
||||
/// Returns the one configured Transport network only when the active HTTP pool is logically coherent.
|
||||
#[must_use]
|
||||
pub(crate) fn coherent_network(&self) -> std::option::Option<String> {
|
||||
let networks = configured_networks(&self.pool.snapshot());
|
||||
if networks.len() != 1 {
|
||||
return std::option::Option::None;
|
||||
}
|
||||
return networks.into_iter().next();
|
||||
}
|
||||
|
||||
/// Builds the current safe Transport-only projection for the Backfill options surface.
|
||||
pub(crate) fn options(&self) -> ksp_core_lib::Result<crate::BackfillDeskOptionsDto> {
|
||||
let snapshot = self.pool.snapshot();
|
||||
@@ -28,7 +38,12 @@ impl TransportRuntime {
|
||||
let transport_ready = configured_networks.len() == 1 && !compatible_roles.is_empty() && snapshot.available_endpoint_count() > 0;
|
||||
return std::result::Result::Ok(crate::BackfillDeskOptionsDto {
|
||||
compatible_roles,
|
||||
composition_ready: false,
|
||||
configured_networks,
|
||||
network_coherent: false,
|
||||
store_diagnostic: std::option::Option::None,
|
||||
store_network: std::option::Option::None,
|
||||
store_ready: false,
|
||||
transport_diagnostic: std::option::Option::None,
|
||||
transport_ready,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user