pub struct ReviewConnector { /* private fields */ }Expand description
ServiceConnector for trusty-review.
Why: trusty-review stores its data under ~/.trusty-review/. An http_addr
file there (if written by the running daemon) gives the exact address;
otherwise we probe the default port 7880.
What: Implements detect() checking ~/.trusty-review/http_addr, then
falling back to http://127.0.0.1:7880 TCP probe when the file is absent.
Test: test_review_connector_with_stale_addr_file,
test_review_connector_no_addr_file below.
Implementations§
Trait Implementations§
Source§impl Default for ReviewConnector
impl Default for ReviewConnector
Source§impl ServiceConnector for ReviewConnector
impl ServiceConnector for ReviewConnector
Source§fn detect(&self) -> ServiceInfo
fn detect(&self) -> ServiceInfo
Detect trusty-review status.
Why: Reads ~/.trusty-review/http_addr — the file the daemon writes
immediately after successfully binding its port. Falls back to probing
the default port 7880 when no discovery file is present (matches the
AnalyzeConnector pattern).
What: Binary check → addr file + TCP probe → fallback default-port TCP → status.
Test: test_review_connector_with_stale_addr_file,
test_review_connector_no_addr_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 ReviewConnector
impl RefUnwindSafe for ReviewConnector
impl Send for ReviewConnector
impl Sync for ReviewConnector
impl Unpin for ReviewConnector
impl UnsafeUnpin for ReviewConnector
impl UnwindSafe for ReviewConnector
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