pub struct ServiceLifecycleConfig {
pub service_name: Arc<str>,
pub probe_bind_addr: Option<SocketAddr>,
pub shutdown_timeout: Duration,
pub liveness_stale_after: Duration,
pub drain_request_methods: DrainRequestMethods,
}Expand description
Versioned runtime configuration for the process lifecycle boundary.
Fields§
§service_name: Arc<str>The service name value.
probe_bind_addr: Option<SocketAddr>The probe bind addr value.
shutdown_timeout: DurationProcess shutdown budget.
The first shutdown request fixes a ShutdownDeadline this far ahead.
That deadline is the single source for component shutdown and the
owner’s final shutdown; repeated requests never extend it.
liveness_stale_after: DurationThe liveness stale after value.
drain_request_methods: DrainRequestMethodsHTTP methods that /drainz accepts.
Implementations§
Source§impl ServiceLifecycleConfig
impl ServiceLifecycleConfig
Sourcepub fn from_env(service_name: impl Into<Arc<str>>) -> RuntimeResult<Self>
pub fn from_env(service_name: impl Into<Arc<str>>) -> RuntimeResult<Self>
Reads the optional probe address and bounded lifecycle budgets from the environment.
The probe server is disabled when ROCKETMQ_HEALTH_BIND_ADDR is absent, preserving
non-Kubernetes entrypoint behavior. Shutdown coordination remains active.
§Errors
Returns a configuration runtime failure for a malformed address, non-UTF-8 input,
zero timeout, a liveness window shorter than two progress intervals, or a
drain method list other than POST or GET,POST.