pub trait Backend {
Show 19 methods
// Required methods
fn get(
&self,
resource_type: &str,
name: &str,
namespace: &str,
) -> Result<String, KubectlError>;
fn delete_pods_by_label(
&self,
namespace: &str,
label_selector: &str,
) -> Result<usize, KubectlError>;
fn get_version(
&self,
timeout: Duration,
interval: Duration,
) -> Result<VersionResponse, KubectlError>;
fn scale(
&self,
resource_type: &str,
name: &str,
namespace: &str,
replicas: i64,
) -> Result<(), KubectlError>;
fn apply(
&self,
json_data: &[u8],
namespace: &str,
) -> Result<(), KubectlError>;
fn delete_manifest(
&self,
data: &[u8],
namespace: &str,
) -> Result<(), KubectlError>;
fn delete(
&self,
resource_type: &str,
name: &str,
namespace: &str,
) -> Result<(), KubectlError>;
fn wait(
&self,
resource_type: &str,
name: &str,
namespace: &str,
condition: &str,
timeout: Duration,
) -> Result<(), KubectlError>;
fn wait_for_rollout_status(
&self,
resource_type: &str,
name: &str,
namespace: &str,
timeout: Duration,
) -> Result<(), KubectlError>;
fn wait_for_pod_ready_by_label(
&self,
namespace: &str,
label_selector: &str,
timeout: Duration,
) -> Result<(), KubectlError>;
fn wait_for_job_complete(
&self,
name: &str,
namespace: &str,
timeout: Duration,
) -> Result<(), KubectlError>;
fn wait_for_job_created(
&self,
name: &str,
namespace: &str,
timeout: Duration,
) -> Result<(), KubectlError>;
fn list_resource_names(
&self,
kind: &str,
namespace: &str,
label_selector: &str,
) -> Result<Vec<String>, KubectlError>;
fn ensure_namespace(&self, name: &str) -> Result<(), KubectlError>;
fn delete_namespace(&self, name: &str) -> Result<(), KubectlError>;
fn namespace_exists(&self, name: &str) -> Result<bool, KubectlError>;
fn wait_for_namespace_ready(
&self,
name: &str,
timeout: Duration,
) -> Result<(), KubectlError>;
fn run_job(
&self,
image: &str,
namespace: &str,
timeout: Duration,
command: &[&str],
) -> Result<String, KubectlError>;
fn get_raw(&self, path: &str) -> Result<String, KubectlError>;
}Expand description
Ported from the Backend interface in interface.go.
Required Methods§
fn get( &self, resource_type: &str, name: &str, namespace: &str, ) -> Result<String, KubectlError>
fn delete_pods_by_label( &self, namespace: &str, label_selector: &str, ) -> Result<usize, KubectlError>
fn get_version( &self, timeout: Duration, interval: Duration, ) -> Result<VersionResponse, KubectlError>
fn scale( &self, resource_type: &str, name: &str, namespace: &str, replicas: i64, ) -> Result<(), KubectlError>
fn apply(&self, json_data: &[u8], namespace: &str) -> Result<(), KubectlError>
fn delete_manifest( &self, data: &[u8], namespace: &str, ) -> Result<(), KubectlError>
fn delete( &self, resource_type: &str, name: &str, namespace: &str, ) -> Result<(), KubectlError>
fn wait( &self, resource_type: &str, name: &str, namespace: &str, condition: &str, timeout: Duration, ) -> Result<(), KubectlError>
fn wait_for_rollout_status( &self, resource_type: &str, name: &str, namespace: &str, timeout: Duration, ) -> Result<(), KubectlError>
fn wait_for_pod_ready_by_label( &self, namespace: &str, label_selector: &str, timeout: Duration, ) -> Result<(), KubectlError>
fn wait_for_job_complete( &self, name: &str, namespace: &str, timeout: Duration, ) -> Result<(), KubectlError>
fn wait_for_job_created( &self, name: &str, namespace: &str, timeout: Duration, ) -> Result<(), KubectlError>
fn list_resource_names( &self, kind: &str, namespace: &str, label_selector: &str, ) -> Result<Vec<String>, KubectlError>
fn ensure_namespace(&self, name: &str) -> Result<(), KubectlError>
fn delete_namespace(&self, name: &str) -> Result<(), KubectlError>
fn namespace_exists(&self, name: &str) -> Result<bool, KubectlError>
fn wait_for_namespace_ready( &self, name: &str, timeout: Duration, ) -> Result<(), KubectlError>
fn run_job( &self, image: &str, namespace: &str, timeout: Duration, command: &[&str], ) -> Result<String, KubectlError>
fn get_raw(&self, path: &str) -> Result<String, KubectlError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".