pub struct PidRecord {
pub pid: u32,
pub started_at_unix_secs: u64,
pub binary_sha256: String,
pub version: String,
pub commit: String,
pub http_address: SocketAddr,
pub grpc_address: SocketAddr,
pub drain_timeout_seconds: u64,
}Expand description
The pid file’s content: one JSON object describing the server incarnation that claimed the home.
Fields§
§pid: u32Operating-system process id of the serving process.
started_at_unix_secs: u64The process start instant in whole seconds since the Unix epoch, read
through the process-table instrument (sysinfo) at boot. Verifiers
compare this against the SAME instrument’s answer for the live pid, so
the check is exact equality, not clock arithmetic: a reused pid wears
a different start instant.
binary_sha256: StringSHA-256 of the serving binary’s bytes, hashed from the executable path at boot. This records WHICH build claimed the home; it is not a liveness discriminator (an upgrade that swaps the binary by rename changes the file on disk while the process keeps its old image).
version: StringCrate version of the serving binary (CARGO_PKG_VERSION at build).
commit: StringSource commit of the serving binary, from
crate::build_identity::BuildIdentity.
http_address: SocketAddrHTTP address the server actually bound — recorded so status probes
the running server’s own listener even when the config file has been
edited since boot.
grpc_address: SocketAddrgRPC address the server actually bound, recorded for the same reason.
drain_timeout_seconds: u64The drain window this incarnation is actually running with, in whole
seconds — recorded for the same reason as the addresses: the running
server’s window may have come from its own command line
(--drain-timeout) or from a config file edited since boot, and a
stop verb that waited out a re-derived value would misreport a healthy
long drain as “still draining” (or force it on a second invocation).
Defaulted on read (module-header ruling): a record written by a build
that predates this field reads as 0, which patience resolution treats
as “no recorded window” and falls through to config.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PidRecord
impl<'de> Deserialize<'de> for PidRecord
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 PidRecord
impl StructuralPartialEq for PidRecord
Auto Trait Implementations§
impl Freeze for PidRecord
impl RefUnwindSafe for PidRecord
impl Send for PidRecord
impl Sync for PidRecord
impl Unpin for PidRecord
impl UnsafeUnpin for PidRecord
impl UnwindSafe for PidRecord
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<M> EmbeddedConversationMessage for Mwhere
M: Serialize,
impl<M> EmbeddedConversationMessage for Mwhere
M: Serialize,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request