pub enum ServiceKind {
Daemon,
Proxy,
HttpServer,
Cockpit,
}Expand description
A long-lived lean-ctx background service that the lifecycle commands
(stop, restart, config apply, uninstall, dev-install) own and may
stop (#2176).
Candidates are only PIDs this instance recorded (daemon PID file, proxy
/health, Cockpit launch record — daemon::owned_service_pids), and each
must also pass this command-line allowlist and an identity check; never
“every lean-ctx process”: the MCP stdio servers of running AI-tool sessions (bare
lean-ctx, lean-ctx mcp), hook processes and in-flight command runners
(lean-ctx -c …, #1292) are not services and are never selected. On
Windows the former MCP blocklist relied on wmic, which current Windows
releases no longer ship; every failed lookup made Claude Code’s MCP servers
“orphans” that restart terminated.
Variants§
Daemon
lean-ctx serve --_foreground-daemon — the daemon daemon start,
the autostart unit and editors start.
Proxy
lean-ctx proxy start … — the API proxy.
HttpServer
lean-ctx serve … without the daemon marker — an HTTP server the user
started deliberately.
Cockpit
lean-ctx cockpit --foreground … — the detached Cockpit server.
Implementations§
Trait Implementations§
Source§impl Clone for ServiceKind
impl Clone for ServiceKind
impl Copy for ServiceKind
Source§impl Debug for ServiceKind
impl Debug for ServiceKind
impl Eq for ServiceKind
Source§impl PartialEq for ServiceKind
impl PartialEq for ServiceKind
impl StructuralPartialEq for ServiceKind
Auto Trait Implementations§
impl Forget for ServiceKind
impl Freeze for ServiceKind
impl Move for ServiceKind
impl RefUnwindSafe for ServiceKind
impl Send for ServiceKind
impl Sync for ServiceKind
impl Unpin for ServiceKind
impl UnsafeUnpin for ServiceKind
impl UnwindSafe for ServiceKind
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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