Skip to main content

poll_once

Function poll_once 

Source
pub async fn poll_once(
    relation: &OperatorRelation,
    estop: &Estop,
    lifecycle: &ServerLifecycle,
    registry: &dyn Registry,
    client: &Client,
    now: OffsetDateTime,
    private: PrivateAddresses,
) -> OperatorTransition
Expand description

One poll: fetch, decide, act. Split out from OperatorPoll::spawn’s closure, and public, so a caller — an integration test walking the bootstrap, in particular — can drive exactly one tick against a real operator repository without spawning a task or waiting on a timer. The spawned poll runs this and, on the same resolved endpoint, the PolicyPoll it was given. Every call here re-reads standing vouches from the first host; the spawned poll is what carries on between ticks.