Struct fluvio_cluster::ClusterChecker [−][src]
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
Auto Trait Implementations
impl !RefUnwindSafe for ClusterChecker
[src]
impl Send for ClusterChecker
[src]
impl Sync for ClusterChecker
[src]
impl Unpin for ClusterChecker
[src]
impl !UnwindSafe for ClusterChecker
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,