Skip to main content

Driver

Trait Driver 

Source
pub trait Driver {
    // Required methods
    fn name(&self) -> &str;
    fn start(&self) -> Result<(), DriverError>;
    fn stop(&self) -> Result<(), DriverError>;
    fn destroy(&self) -> Result<(), DriverError>;
    fn status(&self) -> Result<Status, DriverError>;
    fn get_kubeconfig(&self) -> Result<String, DriverError>;

    // Provided method
    fn domain_sources(&self) -> Option<Vec<DomainSource>> { ... }
}
Expand description

Port of cluster.Manager: the interface every cluster driver implements.

Required Methods§

Source

fn name(&self) -> &str

Name returns the driver’s registered name. Wrapping drivers such as auto return the name of the driver they resolved to.

Source

fn start(&self) -> Result<(), DriverError>

Starts the cluster with its configured settings.

Source

fn stop(&self) -> Result<(), DriverError>

Stops the running cluster gracefully.

Source

fn destroy(&self) -> Result<(), DriverError>

Completely removes the cluster and all its data.

Source

fn status(&self) -> Result<Status, DriverError>

Returns the current status of the cluster.

Source

fn get_kubeconfig(&self) -> Result<String, DriverError>

Returns the kubeconfig content for the cluster as a string.

Provided Methods§

Source

fn domain_sources(&self) -> Option<Vec<DomainSource>>

Lists where to ask this driver’s cluster for its DNS zone, in order; None means the common chain.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Driver for xianyun_cluster::driver::colima::Driver

Source§

impl Driver for xianyun_cluster::driver::external::Driver

Source§

impl Driver for xianyun_cluster::driver::k3d::Driver

Source§

impl Driver for xianyun_cluster::driver::mock::Driver

Source§

impl Driver for xianyun_cluster::driver::vcluster::Driver