pub(crate) fn process_ordinal_from_hostname(hostname: &str) -> Option<&str>Expand description
The process ordinal for a StatefulSet pod, taken from the trailing
--delimited segment of its hostname (e.g.
“mz5ncn-cluster-s1-replica-s1-gen-1-0” → “0”). This mirrors how
orchestrator-kubernetes recovers the process id from pod names.
Returns None when the trailing segment is not a non-negative integer, so
an unexpected hostname leaves CLUSTERD_PROCESS unset rather than set to a
value that fails to parse as the process index.