1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pub mod cluster_swarm_kube;
use crate::instance::{Instance, InstanceConfig};
use anyhow::Result;
use async_trait::async_trait;
#[async_trait]
pub trait ClusterSwarm: Send + Sync {
async fn spawn_new_instance(&self, instance_config: InstanceConfig) -> Result<Instance>;
async fn clean_data(&self, node: &str) -> Result<()>;
async fn get_node_name(&self, pod_name: &str) -> Result<String>;
async fn get_grafana_baseurl(&self) -> Result<String>;
async fn put_file(&self, node: &str, pod_name: &str, path: &str, content: &[u8]) -> Result<()>;
}