pub struct ConfigCheck {
pub valid: bool,
pub message: String,
pub warnings: Vec<String>,
pub admission: AdmissionPolicy,
pub memory_caps: Option<u64>,
pub memory_needed: Option<u64>,
pub memory_max: Option<u64>,
pub revision: Option<String>,
}Expand description
POST /v1/config/check and PUT /v1/config: what runnerd check-config prints for a config. PUT refuses
an invalid one with 422 and this body, which has an ErrorResponse’s message.
Fields§
§valid: boolWhether the daemon can run it.
message: Stringvalid, memory caps sum to …, or why it is not valid.
warnings: Vec<String>What a valid config should still fix.
admission: AdmissionPolicy[host] admission, which decides what must fit MemoryMax: memory_caps under caps, memory_needed
under measured. Caps from a daemon before it said.
memory_caps: Option<u64>Bytes every slot and the mirror take at their caps, all at once, when it parses.
memory_needed: Option<u64>Bytes the admission rule must fit in MemoryMax, when it parses: memory_caps under caps; under measured,
the largest single runner with the mirror. None from a daemon before it said.
memory_max: Option<u64>The MemoryMax of the slice it names; None when unlimited or unknown.
revision: Option<String>From PUT /v1/config, once written: the revision of the text written, to make the next change against.
None from a check, or from a daemon before it.
Implementations§
Source§impl ConfigCheck
impl ConfigCheck
Sourcepub fn verdict(&self, parsed: Option<&Config>) -> Verdict
pub fn verdict(&self, parsed: Option<&Config>) -> Verdict
Its verdict: whether it is valid, and whether its budget fits. With parsed, the config it checked, only a
budget past MemoryMax that is the reason it is not valid does not fit; without it, as when the text does not
parse, a budget the check reports past MemoryMax.
Sourcepub fn budget(&self, parsed: Option<&Config>) -> Option<CheckBudget>
pub fn budget(&self, parsed: Option<&Config>) -> Option<CheckBudget>
What its admission rule holds to MemoryMax, when known: from the check, or from a daemon before it said,
from parsed, the config it checked. None when neither knows, as when the caps overflow.
Sourcepub fn doctor_check(&self) -> Check
pub fn doctor_check(&self) -> Check
Doctor’s check of the config the daemon runs with: it passes with its message, or with its warnings, or fails with why.
Trait Implementations§
Source§impl Clone for ConfigCheck
impl Clone for ConfigCheck
Source§impl Debug for ConfigCheck
impl Debug for ConfigCheck
Source§impl<'de> Deserialize<'de> for ConfigCheck
impl<'de> Deserialize<'de> for ConfigCheck
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 ConfigCheck
Source§impl PartialEq for ConfigCheck
impl PartialEq for ConfigCheck
Source§impl Serialize for ConfigCheck
impl Serialize for ConfigCheck
impl StructuralPartialEq for ConfigCheck
Auto Trait Implementations§
impl Freeze for ConfigCheck
impl RefUnwindSafe for ConfigCheck
impl Send for ConfigCheck
impl Sync for ConfigCheck
impl Unpin for ConfigCheck
impl UnsafeUnpin for ConfigCheck
impl UnwindSafe for ConfigCheck
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.