pub struct SearchConnector { /* private fields */ }Expand description
ServiceConnector for trusty-search.
Why: trusty-search writes its bound address to ~/.trusty-search/http_addr
on successful bind. This connector reads that file and probes the TCP port.
What: Implements detect() using ~/.trusty-search/http_addr as the
discovery file and trusty-search as the binary name.
Test: test_search_connector_with_stale_addr_file and
test_search_connector_no_addr_file below.
Implementations§
Trait Implementations§
Source§impl Default for SearchConnector
impl Default for SearchConnector
Source§impl ServiceConnector for SearchConnector
impl ServiceConnector for SearchConnector
Source§fn detect(&self) -> ServiceInfo
fn detect(&self) -> ServiceInfo
Detect trusty-search status.
Why: Reads ~/.trusty-search/http_addr — the file the daemon writes
immediately after successfully binding its port.
What: Three-step sequence: binary check → addr file + TCP probe → status.
Test: test_search_connector_with_stale_addr_file,
test_search_connector_no_addr_file.
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Stable machine identifier for this service (must be unique per instance). Read more
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Human-readable name shown in the console UI. Read more
Auto Trait Implementations§
impl Freeze for SearchConnector
impl RefUnwindSafe for SearchConnector
impl Send for SearchConnector
impl Sync for SearchConnector
impl Unpin for SearchConnector
impl UnsafeUnpin for SearchConnector
impl UnwindSafe for SearchConnector
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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