Struct FailStaleRequest
pub struct FailStaleRequest {
pub observation: LeaseObservation,
pub now_millis: u64,
pub grace_millis: u64,
pub reason: String,
pub intent: FinalizationIntent,
pub operation: OperationId,
}Expand description
Input to conditional stale-worker failure.
Fields§
§observation: LeaseObservationThe complete observation the caller read before attempting failover.
now_millis: u64The sweeper-local monotonic time at which its unchanged-observation proof matured. This is audit metadata, not a value to compare with the owner’s heartbeat wall clock.
grace_millis: u64How long the caller observed the complete lease unchanged.
reason: StringThe durable failure reason.
intent: FinalizationIntentThe initial finalization intent committed with the stale failure.
operation: OperationIdThe lifecycle operation this call belongs to, for cross-process
correlation. OperationId::NONE when the caller has none — an honest
gap, never a fabricated correlation.
Implementations§
§impl FailStaleRequest
impl FailStaleRequest
pub fn new(
observation: LeaseObservation,
now_millis: u64,
grace_millis: u64,
reason: impl Into<String>,
) -> Self
pub fn new( observation: LeaseObservation, now_millis: u64, grace_millis: u64, reason: impl Into<String>, ) -> Self
Creates a conditional stale-failure request.
pub fn with_intent(self, intent: FinalizationIntent) -> Self
pub fn with_intent(self, intent: FinalizationIntent) -> Self
Adds the durable finalization intent for the stale-failure winner.
pub const fn with_operation(self, operation: OperationId) -> Self
pub const fn with_operation(self, operation: OperationId) -> Self
Tags the request with the lifecycle operation it belongs to.
Defaulted rather than required: a backend must work for a caller with no correlation to offer, and a required id would only ever be satisfied with a fresh one that correlates nothing.
Trait Implementations§
§impl Clone for FailStaleRequest
impl Clone for FailStaleRequest
§fn clone(&self) -> FailStaleRequest
fn clone(&self) -> FailStaleRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more