pub struct Service {Show 14 fields
pub image: Option<String>,
pub source: Source,
pub kind: WorkloadKind,
pub run: Option<String>,
pub on: Option<String>,
pub depends_on: BTreeMap<String, DependencyCondition>,
pub timeout_secs: u64,
pub setup: Option<String>,
pub prepare: Option<String>,
pub secrets: Vec<String>,
pub env: BTreeMap<String, String>,
pub health: Option<Health>,
pub root_origin: bool,
pub substrates: BTreeMap<String, Value>,
}Fields§
§image: Option<String>Container image. Without one, local execution requires a caller host grant.
source: Source§kind: WorkloadKind§run: Option<String>§on: Option<String>§depends_on: BTreeMap<String, DependencyCondition>§timeout_secs: u64§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: Option<Health>Services require a probe; workers may omit it and jobs cannot use it.
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 source_root(
&self,
service: &str,
provider: &str,
) -> Result<Option<String>, DefError>
pub fn source_root( &self, service: &str, provider: &str, ) -> Result<Option<String>, DefError>
Common and provider roots name the same directory. Neither silently overrides the other.
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.