feat: introduce topology readiness and initialization #10

Merged
johnride merged 12 commits from feat/topologyDependencies into master 2025-04-23 15:58:32 +00:00
18 changed files with 1198 additions and 44 deletions
Showing only changes of commit 83ba0e1044 - Show all commits

View File

@@ -41,8 +41,8 @@ impl K8sAnywhereTopology {
async fn try_install_k3d(&self) -> Result<K8sClient, InterpretError> { async fn try_install_k3d(&self) -> Result<K8sClient, InterpretError> {
let maestro = Maestro::new(Inventory::autoload(), LocalhostTopology::new()); let maestro = Maestro::new(Inventory::autoload(), LocalhostTopology::new());
let k3d_score = K3DInstallationScore::default(); let k3d_score = K3DInstallationScore::new();
maestro.interpret(Box::new(k3d_score)).await; maestro.interpret(Box::new(k3d_score)).await?;
todo!( todo!(
"Create Maestro with LocalDockerTopology or something along these lines and run a K3dInstallationScore on it" "Create Maestro with LocalDockerTopology or something along these lines and run a K3dInstallationScore on it"
); );

View File

@@ -5,6 +5,12 @@ use crate::{score::Score, topology::Topology};
#[derive(Debug, Clone, Serialize)] #[derive(Debug, Clone, Serialize)]
pub struct K3DInstallationScore {} pub struct K3DInstallationScore {}
impl K3DInstallationScore {
pub fn new() -> Self {
Self {}
}
}
impl<T: Topology> Score<T> for K3DInstallationScore { impl<T: Topology> Score<T> for K3DInstallationScore {
fn create_interpret(&self) -> Box<dyn crate::interpret::Interpret<T>> { fn create_interpret(&self) -> Box<dyn crate::interpret::Interpret<T>> {
todo!(" todo!("