pub struct Declared {Show 14 fields
pub name: Option<String>,
pub from: Option<String>,
pub http: Option<String>,
pub method: Option<String>,
pub headers: IndexMap<String, String>,
pub body: Option<String>,
pub contains: Option<String>,
pub follow: bool,
pub send: Option<String>,
pub tcp: Option<String>,
pub exec: Option<String>,
pub script: Option<String>,
pub expect: Option<Expect>,
pub wait: Option<u32>,
}Expand description
A check Isoloom runs itself. Exactly one of http, tcp, exec and script says what to
check; from says where from; expect what counts as passing.
Fields§
§name: Option<String>Shown in results. Default: what the check does (http://web/ from user).
from: Option<String>The machine the check runs from (its networks, its routes, its view). Default: the access machine when the spec has one, else the environment’s networks at once.
http: Option<String>An HTTP(S) request to this URL. expect: a status code (default 200), any (an answer
of any status), or blocked (nothing answers).
method: Option<String>With http: the request method (default GET).
headers: IndexMap<String, String>With http: request headers.
body: Option<String>With http: the request body, sent as is.
contains: Option<String>With http: text the response body must contain. With tcp: text the bytes read in
the first 5 seconds of the connection (after send) must contain, like a banner.
follow: boolWith http: follow redirects (up to 5 hops) and compare the final answer’s status, for a
page that redirects (a login page, an app’s index). Default: the first answer counts. A
POST followed by a 301, 302 or 303 goes on as a GET, as in a browser; other methods are
sent again to each hop.
send: Option<String>With tcp and contains: a line written once connected (followed by a newline; end it
with \r for CRLF), before reading.
tcp: Option<String>A TCP connection to host:port. expect: open (default) or blocked.
exec: Option<String>A command run inside the from machine (from is required). expect: text its output
must contain (default: the command succeeds).
script: Option<String>A script in the project, run with sh from the from machine’s position; it exits 0 when
the behavior holds.
expect: Option<Expect>What counts as passing, in the check’s own terms: a status code, any or blocked
for http; open or blocked for tcp; text the output contains for exec. Each
kind’s field says its default.
wait: Option<u32>How long to keep retrying until the check passes, as seconds (90) or a duration (90s,
3m, 1m30s): default 30 seconds for http and tcp (except blocked, tried once), 0
for exec and script. Held in seconds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Declared
impl<'de> Deserialize<'de> for Declared
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>,
Source§impl JsonSchema for Declared
impl JsonSchema for Declared
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 more