pub struct Readiness {
pub ready: bool,
pub version: String,
pub commit: String,
pub dirty: Option<bool>,
pub capabilities: usize,
pub objects: usize,
pub layer: HealthStatus,
pub stale: Option<String>,
pub reasons: Vec<String>,
}Expand description
The answer to “can this process serve traffic”: the local initialisation a request would need, and nothing beyond this process. A readiness check that grew a dependency probe fails a deployment because an unrelated service is down.
Fields§
§ready: boolWhether every part below is in place.
version: StringThis executable’s version.
commit: StringThe commit this executable was built from, or unknown; the same value health.live
answers.
dirty: Option<bool>Whether the build’s tree was dirty; null when the build did not know.
capabilities: usizeHow many capabilities the registry holds; zero would mean nothing to serve.
objects: usizeHow many objects the index holds. Read from the index this process built at start-up: it is already in memory, and reading it walks nothing.
layer: HealthStatusWhether the layer read cleanly. A degraded layer is still served — the diagnostics are the point — so this reports rather than refuses.
stale: Option<String>Why this process is serving code that is no longer on disk: the executable it was
started from has been replaced or removed since. Present, ready is false — a server
answering with yesterday’s code says so in the place it says it is ready, to a client
holding nothing but this answer (I1502).
reasons: Vec<String>Every reason this answer is not a plain yes, as code: words. lease_lost and
stale make ready false: another process holds this checkout’s lease, or this one
serves code that is gone. layer_degraded does not: the layer is served with its
diagnostics, and a client decides whether that is enough.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Readiness
impl<'de> Deserialize<'de> for Readiness
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Readiness
Source§impl JsonSchema for Readiness
impl JsonSchema for Readiness
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Readiness
Auto Trait Implementations§
impl Freeze for Readiness
impl RefUnwindSafe for Readiness
impl Send for Readiness
impl Sync for Readiness
impl Unpin for Readiness
impl UnsafeUnpin for Readiness
impl UnwindSafe for Readiness
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.