pub struct Registry { /* private fields */ }Expand description
What Docker (and srv’s own start-up) has said, and what was last published from it.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn apply(&mut self, event: DockerEvent, now_ms: u64)
pub fn apply(&mut self, event: DockerEvent, now_ms: u64)
One Docker event: the container moves to the state the action names. The same state again changes
nothing, so since_ms stays when it was entered.
Sourcepub fn starting(&mut self, name: &str, image: &str, now_ms: u64)
pub fn starting(&mut self, name: &str, image: &str, now_ms: u64)
srv is bringing name up: shown as starting before Docker says anything. A container that is
already running stays running.
Sourcepub fn replace(&mut self, listed: Vec<Listed>, now_ms: u64)
pub fn replace(&mut self, listed: Vec<Listed>, now_ms: u64)
The whole list from Docker: what it names replaces what was known, and a container it does not
name is gone, except one srv is still bringing up (its image may be downloading, so Docker does not
have it yet, or has made it and not started it), which stays starting for [STARTING_GRACE_MS].
Sourcepub fn set_runtime(
&mut self,
probe: Probe,
now_ms: u64,
) -> Option<ContainerRuntimeStatus>
pub fn set_runtime( &mut self, probe: Probe, now_ms: u64, ) -> Option<ContainerRuntimeStatus>
The runtime as just looked at. Some when it differs from the last look in anything but the time.
Sourcepub fn changes(
&mut self,
agents: &HashMap<String, String>,
now_ms: u64,
) -> Vec<ContainerStatus>
pub fn changes( &mut self, agents: &HashMap<String, String>, now_ms: u64, ) -> Vec<ContainerStatus>
What differs from what was last published, given the agents’ names (by id): a changed container, and
a removed one once, as gone. Drops what is gone.
Sourcepub fn containers(&self) -> Vec<ContainerStatus>
pub fn containers(&self) -> Vec<ContainerStatus>
The containers as last published, by name.
Sourcepub fn runtime(&self, now_ms: u64) -> ContainerRuntimeStatus
pub fn runtime(&self, now_ms: u64) -> ContainerRuntimeStatus
The runtime as last seen; “not available” before the first look.
Sourcepub fn is_dormant(&self) -> bool
pub fn is_dormant(&self) -> bool
Whether the runtime is absent, was never seen and has no container to report: nothing then needs
looking at until something wakes Hub::dormant_until_woken.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more