pub struct MpmConnector { /* private fields */ }Expand description
ServiceConnector for trusty-mpm.
Why: trusty-mpm stores its daemon lock under ~/.trusty-mpm/daemon.lock. The
addr line there gives the exact loopback address the daemon bound (the port
is dynamic/auto). When present and reachable the service is Running.
What: implements detect() parsing the lock file’s addr and TCP-probing it.
Test: mpm_connector_parses_lock_addr, mpm_connector_no_lock_file.
Implementations§
Source§impl MpmConnector
impl MpmConnector
Trait Implementations§
Source§impl Default for MpmConnector
impl Default for MpmConnector
Source§impl ServiceConnector for MpmConnector
impl ServiceConnector for MpmConnector
Source§fn detect(&self) -> ServiceInfo
fn detect(&self) -> ServiceInfo
Detect trusty-mpm status.
Why: reads ~/.trusty-mpm/daemon.lock (TOML) — the file the daemon writes
after binding its (dynamic) port. The console only probes liveness; it
never calls the daemon HTTP directly (#1104).
What: binary check → parse lock addr → TCP probe → status. No discovery
file (or unreachable) with the binary present yields Available.
Test: mpm_connector_parses_lock_addr, mpm_connector_no_lock_file.
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Auto Trait Implementations§
impl Freeze for MpmConnector
impl RefUnwindSafe for MpmConnector
impl Send for MpmConnector
impl Sync for MpmConnector
impl Unpin for MpmConnector
impl UnsafeUnpin for MpmConnector
impl UnwindSafe for MpmConnector
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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