pub struct OfflineState {
pub consecutive: u32,
pub retry_in: Duration,
pub offline_for: Option<Duration>,
}Expand description
What an operator is told while GitHub is unreachable.
Flow 3.3 requires four things of an outage — start no new runner, retain
existing runner processes, report offline, back off with jitter — and one
thing of the state: that it says GitHub cancels queued jobs after 24 hours,
so a prolonged outage loses queued work. That bound is stated here rather
than left for a reader to infer, because an operator who does not know it has
no reason to treat a long outage as urgent.
Fields§
§consecutive: u32The unbroken run of failed polls.
retry_in: DurationHow long until the next attempt.
offline_for: Option<Duration>How long this loop has been unable to reach GitHub, when it is known.
Implementations§
Source§impl OfflineState
impl OfflineState
pub const fn new(consecutive: u32, retry_in: Duration) -> Self
pub const fn since(self, offline_for: Duration) -> Self
Sourcepub fn has_outlasted_the_queue(&self) -> bool
pub fn has_outlasted_the_queue(&self) -> bool
Whether the outage has already outlasted GitHub’s queue.
false when the duration is unknown: this reports a fact, and “we cannot
tell” is not the same fact as “not yet”.
Trait Implementations§
Source§impl Clone for OfflineState
impl Clone for OfflineState
Source§fn clone(&self) -> OfflineState
fn clone(&self) -> OfflineState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OfflineState
Source§impl Debug for OfflineState
impl Debug for OfflineState
Source§impl Display for OfflineState
impl Display for OfflineState
impl Eq for OfflineState
Source§impl PartialEq for OfflineState
impl PartialEq for OfflineState
impl StructuralPartialEq for OfflineState
Auto Trait Implementations§
impl Freeze for OfflineState
impl RefUnwindSafe for OfflineState
impl Send for OfflineState
impl Sync for OfflineState
impl Unpin for OfflineState
impl UnsafeUnpin for OfflineState
impl UnwindSafe for OfflineState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.