pub struct ServiceRecord {
pub protocol_major: u32,
pub protocol_minor: u32,
pub service: String,
pub role: String,
pub rank: u8,
pub pid: u32,
pub endpoint: String,
pub version: String,
pub started_ms: u64,
pub process_started_ms: u64,
pub engine_version: String,
}Expand description
<suite>/runtime/<service>/service.json.
A superset of HeardRight’s ServiceRecord (protocol_major, protocol_minor,
role, pid, endpoint, engine_version): the fields HeardRight does not
write default on read, and engine_version is written alongside version
so an unchanged HeardRight client still parses a record written here.
Fields§
§protocol_major: u32§protocol_minor: u32§service: String§role: StringProduct label of the host (HeardRight: heard_right_shell, …).
rank: u8Lower rank wins the service. RANK_UNKNOWN when the writer gave none.
pid: u32§endpoint: StringUnix socket path or named-pipe name.
version: String§started_ms: u64Publication time (ms since epoch) of this record. HeardRight-compatible meaning; never used to validate the PID.
process_started_ms: u64Birth time of the owning process (ms since epoch), when the writer knows it. Only when present is it compared against the live process to reject a reused PID; records without it fall back to plain PID liveness.
engine_version: StringHeardRight’s name for version; mirrored so either reader works.
Implementations§
Source§impl ServiceRecord
impl ServiceRecord
Sourcepub fn host_version(&self) -> &str
pub fn host_version(&self) -> &str
The host version, from whichever field the writer used.