pub struct ServiceConfig {
pub schema_version: u32,
pub name: String,
pub description: Option<String>,
pub address: ServiceAddress,
pub components: Vec<ServiceComponent>,
pub db: DbCatalog,
}Expand description
An operator-facing service declaration from
.yah/services/<svc>/service.toml.
A service groups one or more components (a static surface, a containerized
API, an almanac…) under a single address.
Mirrors project the service onto concrete infra; see MirrorConfig.
Fields§
§schema_version: u32§name: String§description: Option<String>One-line operator-facing answer to “what is this and why does the camp run it?”, rendered beside the service wherever it is listed.
New surface in R926, and it exists because the registry had no place to say what a service IS. A name and a domain identify a service to someone who already knows the fleet; they tell a reader who does not nothing at all, so the knowledge lived in whichever working doc or board annotation last touched the thing. That is exactly the knowledge a health check makes actionable — a red cell is only useful next to what went red.
Deliberately not a free-form [meta] table: one field with one
meaning cannot accumulate a second half-owner, which is the
failure the headscale appliance already demonstrated four times
over (see this repo’s CLAUDE.md on giving a thing ONE owner).
Optional, because nine services predate it and a required field
would make every one of them fail to load. None renders as no
description rather than as an empty one.
address: ServiceAddressHow this service is reached, and therefore how its liveness is
probed. See ServiceAddress.
components: Vec<ServiceComponent>§db: DbCatalogDatabases this service exposes, grouped by environment (W241). Every
entry becomes a data-workbench / sql_* catalog id of the shape
<env>:<service>:<name> (e.g. pond:scrabcake:main). Optional and
default-empty — services without databases omit the [db] table
entirely.
Implementations§
Source§impl ServiceConfig
impl ServiceConfig
Sourcepub fn domain(&self) -> Option<&str>
pub fn domain(&self) -> Option<&str>
The service’s domain, or None when it is node-addressed
(R926-F1). Callers that cannot proceed without one must say which
service and why — see ServiceAddress::domain.
Sourcepub fn require_domain(&self, wanted_for: &str) -> Result<&str>
pub fn require_domain(&self, wanted_for: &str) -> Result<&str>
The domain, or an error naming this service and what the caller
wanted it for. The shape every yah cloud apply reader wants: a
node-addressed service is not deployed by the reconcilers at all,
so reaching one of them with a Node address is a config bug and
deserves a sentence, not an unwrap.
pub fn health_path(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for ServiceConfig
impl Clone for ServiceConfig
Source§impl Debug for ServiceConfig
impl Debug for ServiceConfig
Source§impl<'de> Deserialize<'de> for ServiceConfig
impl<'de> Deserialize<'de> for ServiceConfig
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 ServiceConfig
impl RefUnwindSafe for ServiceConfig
impl Send for ServiceConfig
impl Sync for ServiceConfig
impl Unpin for ServiceConfig
impl UnsafeUnpin for ServiceConfig
impl UnwindSafe for ServiceConfig
Blanket Implementations§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for 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