Struct fluvio_cluster::ClusterChecker[][src]

#[non_exhaustive]pub struct ClusterChecker { /* fields omitted */ }

Manages all cluster check operations

A ClusterChecker can be configured with different sets of checks to run. It can wait for all checks to run sequentially using run_wait, or spawn a task and receive progress updates about checks using run_with_progress.

Implementations

impl ClusterChecker[src]

pub fn empty() -> Self[src]

Creates an empty checker with no checks to be run.

Be sure to use methods like with_check to add checks before calling one of the run methods or they will do nothing.

Example

let checker: ClusterChecker = ClusterChecker::empty();

pub fn with_check<C: ClusterCheck, B: Into<Box<C>>>(self, check: B) -> Self[src]

Adds a check to this ClusterChecker

pub fn with_preflight_checks(self) -> Self[src]

Adds all preflight checks to this checker.

Note that no checks are run until one of the run methods are invoked.

pub fn with_k8_checks(self) -> Self[src]

Adds all checks required for starting a cluster on minikube.

Note that no checks are run until one of the run methods are invoked.

pub fn with_local_checks(self) -> Self[src]

Adds all checks required for starting a local cluster.

Note that no checks are run until one of the run methods are invoked.

pub async fn run_wait(&self) -> CheckResults[src]

Performs all checks sequentially and returns the results when done.

This may appear to "hang" if there are many checks. In order to see fine-grained progress about ongoing checks, use run_with_progress instead.

Example

let check_results: CheckResults = ClusterChecker::empty()
    .with_preflight_checks()
    .run_wait()
    .await;

pub async fn run_wait_and_fix(&self) -> CheckResults[src]

Performs all checks sequentially, attempting to fix any problems along the way.

This may appear to "hang" if there are many checks, or if fixes take a long time.

pub fn run_with_progress(self) -> Receiver<CheckResult>[src]

Performs all checks in an async task, returning the results via a channel.

This function will return immediately with a channel which will yield progress updates about checks as they are run.

If you want to run the checks as a single batch and receive all of the results at once, use run_wait instead.

Example

use async_channel::Receiver;
let progress: Receiver<CheckResult> = ClusterChecker::empty()
    .with_preflight_checks()
    .run_with_progress();
while let Ok(check_result) = progress.recv().await {
    println!("Got check result: {:?}", check_result);
}

pub fn run_and_fix_with_progress(self) -> Receiver<CheckResult>[src]

Performs all checks in an async task and attempts to fix anything it can.

This function will return immediately with a channel which will yield progress updates about checks and fixes as they run.

If you want to run checks and fixes as a single batch and receive all of the results at once, use run_wait instead.

Trait Implementations

impl Debug for ClusterChecker[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]