pub enum PollInput {
Unknown,
Observation {
owner: ParticipantId,
rank: Rank,
lease_duration: Duration,
elapsed: Duration,
},
Leadership {
rank: Rank,
lease_duration: Duration,
elapsed: Duration,
},
}Expand description
What the polling caller claims about the durable state, with the time elapsed since its anchor measured on the caller’s own monotonic clock.
The recipe holds no time: it only compares the claimed tuple with durable
state and elapsed with the claimed lease_duration. Local callers build
it with LocalState::input. A transport service relaying a remote caller
builds it from the request and must authenticate that caller.
Honest elapsed reporting is a protocol precondition: the exact-tuple
check only rejects stale or mismatched callers. A caller, even an
authenticated one, that inflates elapsed for the exact current tuple can
take over early. A service that does not trust its callers must enforce
timing itself.
Variants§
Unknown
The caller has not adopted any poll result. It follows any durable owner.
Observation
An exact durable owner record the caller observed and is not authorized to renew.
Only an exact match of owner, rank, and lease_duration with
durable state, with elapsed at least lease_duration, permits a
takeover (or a reacquisition when owner is the polling participant).
Leadership
The durable owner record the polling participant claims to hold.
The owner is the participant passed to
super::LeaderElection::poll. It renews only on an exact durable
match with elapsed strictly below lease_duration.