Skip to main content

DetectorHealth

Enum DetectorHealth 

Source
pub enum DetectorHealth {
    Unchecked {
        scoring_unread: Option<String>,
    },
    Available {
        since: Timestamp,
        scoring_unread: Option<String>,
    },
    Unavailable {
        since: Timestamp,
        scoring_unread: Option<String>,
    },
    Scoring {
        since: Timestamp,
        verdict: ScoringVerdict,
        probe_failure: Option<String>,
    },
}
Expand description

The failure detector’s status, and since when it has been so.

Evidence that the detector is scoring the print comes first: while its own record of the print’s live prediction moved between two of this server’s reads within the last two observation intervals, it is scoring, whatever its health check answers. Without that evidence its health check decides.

On the wire it is the object the status and context reads answer — status; since, null exactly when the status is unchecked; the failing health check named beside a scoring status as probe_failure; and, beside any other status, why the detector’s scoring is not being read as scoring_unread — and an object pairing them any other way is refused rather than read.

Variants§

§

Unchecked

No evidence of any kind: no detector health address is configured, or no check has been made yet, and nothing shows it scoring.

Fields

§scoring_unread: Option<String>

Why the detector’s scoring is not being read, when it is not.

§

Available

No evidence that it is scoring the print, and it answered its health check, from this instant on.

Fields

§since: Timestamp

When it was first found answering.

§scoring_unread: Option<String>

Why the detector’s scoring is not being read, when it is not.

§

Unavailable

No evidence that it is scoring the print, and it did not answer its health check, from this instant on.

Fields

§since: Timestamp

When it was first found not answering.

§scoring_unread: Option<String>

Why the detector’s scoring is not being read, when it is not.

§

Scoring

The detector is scoring the print, from this instant on.

Fields

§since: Timestamp

When it was first found scoring it.

§verdict: ScoringVerdict

Whether a failure alert of its own has arrived for the print.

§probe_failure: Option<String>

What the detector’s health check answered, when it is failing while the detector scores.

Implementations§

Source§

impl DetectorHealth

Source

pub const fn status(&self) -> DetectorHealthStatus

The status this is.

Trait Implementations§

Source§

impl Clone for DetectorHealth

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DetectorHealth

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DetectorHealth

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for DetectorHealth

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for DetectorHealth

Source§

impl JsonSchema for DetectorHealth

The schema describes the five states as arms tagged by status, so a generated client cannot pair a status with the wrong since either.

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

impl PartialEq for DetectorHealth

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Sample for DetectorHealth

Source§

fn sample_full() -> Self

A value carrying every field the type declares.
Source§

fn sample_minimal() -> Self

A value carrying every optional field absent.
Source§

fn sample_alternates() -> Vec<Self>

One value per further arm, for a type whose wire form is a union. Read more
Source§

impl Serialize for DetectorHealth

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DetectorHealth

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.