Skip to content

sidecar_markers

Structs

  • MetadataFile - On-disk schema of <runtime>/run/<sandbox_id>/metadata.toml.
  • SidecarEntry - One row of firma sidecar status. Serialized verbatim by --json.

Functions

  • gc_stale - Remove every stale marker dir under <runtime>/run. Returns the
  • get - Probe a single sidecar by sandbox_id. Returns Ok(None) when no such
  • list - List all live per-run sidecars under <runtime>/run, GC’ing stale
  • probe_entry - Read + probe a single marker directory.

Constants

  • TCP_PROBE_TIMEOUT - Connect timeout for the TCP liveness probe of an http_proxy interceptor.

firma_runtime_state::sidecar_markers::MetadataFile

Section titled “firma_runtime_state::sidecar_markers::MetadataFile”

Struct

On-disk schema of <runtime>/run/<sandbox_id>/metadata.toml.

Fields:

  • sandbox_id: String - Sandbox identifier for this run.
  • agent_id: String - Agent identifier for this run.
  • session_id: String - Session identifier for this run.
  • authority_url: String - URL of the authority that issued the capability tokens for this run.
  • policy_bundle_version: String - Policy bundle version digest string, as written by firma-run at startup.
  • pid: crate::process_id::UserProcessId - PID of the sidecar process.
  • started_at: String - RFC 3339 UTC timestamp of when the sidecar process started.
  • listen: String - Interceptor listen endpoint to health-probe: a host:port pair for an

Trait Implementations:

  • Serialize
    • fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
  • Deserialize
    • fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
  • Clone
    • fn clone(self: &Self) -> MetadataFile
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_runtime_state::sidecar_markers::SidecarEntry

Section titled “firma_runtime_state::sidecar_markers::SidecarEntry”

Struct

One row of firma sidecar status. Serialized verbatim by --json.

Fields:

  • sandbox_id: String - Sandbox identifier for this run.
  • agent_id: String - Agent identifier for this run.
  • session_id: String - Session identifier for this run.
  • authority_url: String - URL of the authority that issued the capability tokens for this run.
  • policy_bundle_version: String - Policy bundle version digest string.
  • pid: Option<crate::process_id::UserProcessId> - PID of the sidecar process, when known.
  • started_at: String - RFC 3339 UTC timestamp of when the sidecar process started.
  • state: crate::status::State - Coarse-grained liveness state derived from pid + socket probes.
  • listen: std::path::PathBuf - Interceptor listen endpoint: a TCP host:port value or Unix-domain socket path.
  • uptime_secs: Option<u64> - Seconds since sidecar.pid was written in the marker directory, used as a proxy for sidecar start time. None if the file is absent or its mtime is in the future.

Trait Implementations:

  • Serialize
    • fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
  • Clone
    • fn clone(self: &Self) -> SidecarEntry
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_runtime_state::sidecar_markers::TCP_PROBE_TIMEOUT

Section titled “firma_runtime_state::sidecar_markers::TCP_PROBE_TIMEOUT”

Constant: std::time::Duration

Connect timeout for the TCP liveness probe of an http_proxy interceptor.

firma_runtime_state::sidecar_markers::gc_stale

Section titled “firma_runtime_state::sidecar_markers::gc_stale”

Function

Remove every stale marker dir under <runtime>/run. Returns the sandbox ids removed, sorted. Missing run/ is not an error.

Returns [crate::error::RuntimeStateError::Io] if the run/ dir exists but cannot be enumerated.

fn gc_stale(runtime_dir: &std::path::Path) -> crate::error::Result<Vec<String>>

Function

Probe a single sidecar by sandbox_id. Returns Ok(None) when no such marker dir exists.

Returns a parse or I/O error from [probe_entry] when the marker exists but is malformed.

fn get(runtime_dir: &std::path::Path, sandbox_id: &str) -> crate::error::Result<Option<SidecarEntry>>

firma_runtime_state::sidecar_markers::list

Section titled “firma_runtime_state::sidecar_markers::list”

Function

List all live per-run sidecars under <runtime>/run, GC’ing stale marker dirs as a side effect. Sorted by sandbox_id.

Corrupt or transiently-missing markers (race away between readdir and open, or with an unparseable metadata.toml) are skipped so that one bad marker does not break the full listing. Use [get] when you need an error surfaced for a specific sandbox id.

Returns [crate::error::RuntimeStateError::Io] if run/ exists but cannot be enumerated, or any I/O error other than NotFound from [probe_entry].

fn list(runtime_dir: &std::path::Path) -> crate::error::Result<Vec<SidecarEntry>>

firma_runtime_state::sidecar_markers::probe_entry

Section titled “firma_runtime_state::sidecar_markers::probe_entry”

Function

Read + probe a single marker directory.

This is the lower-level single-marker primitive used by [list] and [get]. It is pub for module-level integration tests but is not re-exported at the crate root.

Returns [crate::error::RuntimeStateError::Io] when metadata.toml cannot be read and [crate::error::RuntimeStateError::MarkerParse] on parse failure (fail-closed: an unreadable marker is surfaced, never silently treated as healthy).

fn probe_entry(marker_dir: &std::path::Path) -> crate::error::Result<SidecarEntry>