pub struct Service {
pub source: Source,
pub setup: Option<String>,
pub prepare: Option<String>,
pub secrets: Vec<String>,
pub env: BTreeMap<String, String>,
pub health: Health,
pub root_origin: bool,
pub substrates: BTreeMap<String, Value>,
}Fields§
§source: Source§setup: Option<String>Runs once after the service’s source is materialized.
prepare: Option<String>Runs on every up, after dependencies are ready, before start.
secrets: Vec<String>Secrets injected as same-named env vars; must be in [secrets].required.
env: BTreeMap<String, String>§health: HealthEvery service declares a health check (ARCHITECTURE.md §1).
root_origin: boolAt most one service per stack also claims http://{instance}.localhost.
substrates: BTreeMap<String, Value>Per-substrate run config ([services.X.local], [services.X.render], …).
Implementations§
Source§impl Service
impl Service
Sourcepub fn substrate_env(
&self,
service_name: &str,
substrate: &str,
) -> Result<BTreeMap<String, String>, DefError>
pub fn substrate_env( &self, service_name: &str, substrate: &str, ) -> Result<BTreeMap<String, String>, DefError>
The env overlay inside a substrate block, when present.
§1 resolution rules: substrate env blocks overlay the common
env. This is the one key core reads inside an otherwise opaque
substrate block.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Service
impl<'de> Deserialize<'de> for Service
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Service
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnsafeUnpin for Service
impl UnwindSafe for Service
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
Mutably borrows from an owned value. Read more