pub struct ServiceInfo {
pub id: String,
pub display_name: String,
pub status: ServiceStatus,
pub version: Option<String>,
pub url: Option<String>,
pub hint: Option<String>,
pub lifecycle: ServiceLifecycle,
}Expand description
All facts gathered about a service in one detection pass.
Why: The API handler turns this struct directly into JSON for
GET /api/console/services, so callers get a stable shape to render cards.
What: id is the stable machine identifier; display_name is human-
readable; status is the current runtime state; version is the version
string from /health when the daemon is running (absent otherwise);
url is the daemon base URL when reachable; hint is an optional
actionable remediation message surfaced when status is Degraded;
lifecycle says whether a stopped daemon or an installed on-demand binary
is the healthy reading of that status (#6416).
Test: Tested via the server integration test in server.rs.
Fields§
§id: StringStable machine identifier (e.g. "trusty-search").
display_name: StringHuman-readable display name (e.g. "Trusty Search").
status: ServiceStatusCurrent runtime state.
version: Option<String>Version string reported by the running daemon’s /health endpoint.
url: Option<String>Base URL of the running daemon (e.g. "http://127.0.0.1:7879").
hint: Option<String>Actionable remediation hint — present when status is Degraded.
Example: “reachable but console_metrics tool not registered — check
serve --stdio wiring / restart the daemon”.
lifecycle: ServiceLifecycleWhether this member runs as a resident daemon or on demand (#6416).
Serialised unconditionally — the UI branches on it — and #[serde(default)]
so a payload written before #6416 still deserialises, as a daemon.
Trait Implementations§
Source§impl Clone for ServiceInfo
impl Clone for ServiceInfo
Source§fn clone(&self) -> ServiceInfo
fn clone(&self) -> ServiceInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServiceInfo
impl Debug for ServiceInfo
Source§impl<'de> Deserialize<'de> for ServiceInfo
impl<'de> Deserialize<'de> for ServiceInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ServiceInfo
impl RefUnwindSafe for ServiceInfo
impl Send for ServiceInfo
impl Sync for ServiceInfo
impl Unpin for ServiceInfo
impl UnsafeUnpin for ServiceInfo
impl UnwindSafe for ServiceInfo
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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