pub enum Action<A, E> {
Dial(Attempt<A>),
Established(Box<Session>),
Abandon,
Migrating,
Retired,
Offline(Option<E>),
Retrying(E),
Wait(Option<Instant>),
Probe(Attempt<A>),
Done(Result<(), E>),
}Expand description
What Reconnect::poll asks of the caller.
Exhaustive on purpose: a new action is one every driver must handle.
Variants§
Dial(Attempt<A>)
Dial this attempt and report it with Reconnect::connected or
Reconnect::failed, polling meanwhile. Build each session’s client with
Attempt::client.
Established(Box<Session>)
The live session is established: its peer accepted the connection credential or
drained it with a GOAWAY, or, on a version with no answer (moq-lite 03/04), it stayed
up past Backoff::healthy. Until then a
connected session may still be a refusal, so report it as serving only from here.
Carries the session, which a GOAWAY may already have moved to the predecessor.
Abandon
Drop the dial or probe in flight: it ran out its deadline, which already counted as its failure, or the predecessor’s peer redirected while it headed for that peer.
Migrating
The predecessor serves while a replacement is dialed: the
live session got a GOAWAY and now drains as it, or the replacement closed while it
still drains.
Retired
The predecessor closed or overstayed its handover.
Offline(Option<E>)
Nothing serves anymore: the live session ended with this error, or the predecessor retired between sessions. A redial follows.
Retrying(E)
Why the policy is waiting to redial: a walk failed, or a session ended.
Wait(Option<Instant>)
Poll again by this instant, or on a wake.
Probe(Attempt<A>)
The live session runs on a fallback, set by Reconnect::fallback. Reach this
attempt’s peer over the preferred transport alone, without the MoQ handshake, and
report it with Reconnect::probed. Drop it if the live session ends first: on
Action::Migrating, Action::Offline, or Action::Done.
Done(Result<(), E>)
The policy gave up with an error, or ended cleanly. Every later poll waits forever.