pub struct CoreSpec {Show 19 fields
pub no_mdns: bool,
pub no_certmesh: bool,
pub no_dns: bool,
pub no_health: bool,
pub no_proxy: bool,
pub no_udp: bool,
pub no_runtime: bool,
pub data_dir: Option<PathBuf>,
pub dns_config: DnsConfig,
pub runtime: String,
pub http_port: u16,
pub dns_state_path: Option<PathBuf>,
pub proxy_data_dir: Option<PathBuf>,
pub dns_auto_start: bool,
pub health_auto_start: bool,
pub proxy_auto_start: bool,
pub spawn_orchestrator: bool,
pub spawn_certmesh_loops: bool,
pub fail_fast: bool,
}Expand description
Capability flags + inputs needed to build the cores. A daemon-Config subset, kept here
(rather than depending on the binary’s Config) so koi-compose stays standalone.
The daemon and the Windows service fill it via [CoreSpec::daemon]; koi-embedded sets
the embedded-only forks (data-dir-scoped proxy, pinned DNS state path, the auto-start +
background-loop opt-ins) directly. Every field has a daemon default so the two boot paths
build the identical graph.
Fields§
§no_mdns: bool§no_certmesh: bool§no_dns: bool§no_health: bool§no_proxy: bool§no_udp: bool§no_runtime: bool§data_dir: Option<PathBuf>Data directory for certmesh state. None uses the platform default (embedded leaves
it unset when the host did not pin one); the daemon always resolves a concrete dir.
dns_config: DnsConfigDNS configuration (the caller’s resolved DnsConfig).
runtime: StringRuntime backend selector string (“auto”, “docker”, “podman”, …).
http_port: u16Daemon HTTP port (the local management/API port the daemon binds).
dns_state_path: Option<PathBuf>Override the DNS state file path (embedded pins it to its data dir to be immune to
KOI_DATA_DIR races in parallel tests). None keeps the dns_config value.
proxy_data_dir: Option<PathBuf>Build the proxy core scoped to this data dir (ProxyCore::with_data_dir). None
uses the platform-default proxy state (the daemon’s behavior).
dns_auto_start: boolStart the DNS server after constructing its core. The daemon always does; embedded
gates it on dns_auto_start.
health_auto_start: boolStart health checks after constructing the core (daemon: always; embedded: opt-in).
proxy_auto_start: boolStart the proxy listeners after constructing the core (daemon: always; embedded: opt-in).
spawn_orchestrator: boolSpawn the runtime orchestrator when the runtime adapter is present (daemon: always;
embedded: opt-in via the orchestrator builder flag).
spawn_certmesh_loops: boolSpawn the certmesh role-driven background loop when certmesh is present (daemon:
always; embedded: opt-in via the certmesh_background builder flag).
fail_fast: boolFail-fast contract: when true (koi-embedded, a library), the first core that fails to
initialize or auto-start aborts build_cores with BuildCoresError. When false
(the daemon/service), failures are logged and that capability is dropped so the daemon
keeps serving its remaining capabilities.
Implementations§
Source§impl CoreSpec
impl CoreSpec
Sourcepub fn daemon_defaults() -> Self
pub fn daemon_defaults() -> Self
The daemon/Windows-service defaults for the embedded-fork fields: platform-default proxy/DNS state, always start DNS/health/proxy, always spawn the orchestrator and the certmesh loops. Spread it into a struct literal so the daemon only names the capability flags + resolved inputs and cannot accidentally diverge from the service.
CoreSpec { no_mdns, /* … */, data_dir: Some(dir), dns_config, runtime, http_port,
..CoreSpec::daemon_defaults() }Auto Trait Implementations§
impl Freeze for CoreSpec
impl RefUnwindSafe for CoreSpec
impl Send for CoreSpec
impl Sync for CoreSpec
impl Unpin for CoreSpec
impl UnsafeUnpin for CoreSpec
impl UnwindSafe for CoreSpec
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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