pub struct FirewallReport {
pub ok: bool,
pub platform: String,
pub backend: Backend,
pub executable: Option<String>,
pub plan: FirewallPlan,
pub commands: Vec<AdmitCommand>,
pub observation: FirewallObservation,
pub window_seconds: u64,
pub blocked_recently: Option<BTreeMap<String, u64>>,
pub verdict: String,
}Expand description
The whole report: the plan, the backend, the commands, the firewall’s word and the
kernel’s, with one verdict sentence and one ok. What mesh.firewall answers and
what the doctor’s firewall check reads.
use majordomus_cli::mesh::firewall::{report, FirewallReport, BLOCK_WINDOW_SECONDS};
let r: FirewallReport = report(None, &[], None);
assert!(r.ok && r.commands.is_empty());
assert_eq!(r.window_seconds, BLOCK_WINDOW_SECONDS);
assert_eq!(r.platform, std::env::consts::OS);Fields§
§ok: boolWhether the host admits the mesh as far as it can be observed: nothing missing, and nothing logged as dropped.
platform: StringThe platform (linux, macos, …).
backend: BackendThe firewall front found.
executable: Option<String>The executable the server runs as, which is what the macOS firewall admits.
plan: FirewallPlanWhat the declaration implies this host must admit.
commands: Vec<AdmitCommand>The commands that admit it on this backend; what apply runs.
observation: FirewallObservationThe firewall’s own word about the plan.
window_seconds: u64The window blocked_recently covers, in seconds.
blocked_recently: Option<BTreeMap<String, u64>>Drops the kernel logged toward the plan’s ports within the window, per port; absent when the log could not be read.
verdict: StringThe sentence a person reads.
Trait Implementations§
Source§impl Clone for FirewallReport
impl Clone for FirewallReport
Source§fn clone(&self) -> FirewallReport
fn clone(&self) -> FirewallReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FirewallReport
impl Debug for FirewallReport
Source§impl<'de> Deserialize<'de> for FirewallReport
impl<'de> Deserialize<'de> for FirewallReport
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 FirewallReport
impl JsonSchema for FirewallReport
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