use async_trait::async_trait;
use derive_new::new;

use super::{HelmCommand, PreparationError, PreparationOutcome, Topology};

#[derive(new)]
pub struct LocalhostTopology;

#[async_trait]
impl Topology for LocalhostTopology {
    fn name(&self) -> &str {
        "LocalHostTopology"
    }

    async fn ensure_ready(&self) -> Result<PreparationOutcome, PreparationError> {
        Ok(PreparationOutcome::Success {
            details: "Localhost is Chuck Norris, always ready.".into(),
        })
    }
}

// TODO: Delete this, temp for test
impl HelmCommand for LocalhostTopology {}
