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

use crate::interpret::{InterpretError, Outcome};

use super::{HelmCommand, Topology};

#[derive(new)]
pub struct LocalhostTopology;

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

    async fn ensure_ready(&self) -> Result<Outcome, InterpretError> {
        Ok(Outcome::success(
            "Localhost is Chuck Norris, always ready.".to_string(),
        ))
    }
}

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