pub struct ServiceComponent {
pub id: String,
pub kind: String,
pub path: String,
pub git: Option<GitSource>,
pub role: String,
pub publishes: Option<String>,
pub mount: Option<String>,
pub wave: u32,
pub deploy: DeployTier,
}Expand description
One component of a ServiceConfig. The kind (e.g. "mesofact-static",
"almanac", "container") selects which reconciler runs against the
pointed-at workload manifest.
Fields§
§id: String§kind: String§path: StringPath of the directory holding this component’s workload.toml. Relative
to the workspace root for in-tree components, or to the materialized
<checkout>/<subdir> when git is set.
git: Option<GitSource>Optional external git source (R561-F1). When set, the component’s code
is materialized by shallow-clone before build; see GitSource.
role: StringOperator-facing role label, e.g. "static", "dynamic", "compute".
publishes: Option<String>Optional artifact kind this component publishes ("static",
"container-image", …). Drives mirror provider-slot routing.
mount: Option<String>URL sub-path a static component’s build output is published under,
relative to the service’s publish prefix (R746). None = the service
root, which is what every pre-R746 component means.
Static publishers lay a component’s out_dir down at
<bucket>/<service>/<env>/… and the front door fetches
${ASSET_ORIGIN}/<request path> — the request path is the key. So a
service with two static components had them overwrite each other at
one prefix, and there was no way to say “this bundle serves under
/app”. mount is that: it appends to the publish prefix, which makes
the URL sub-path and the storage sub-path the same string by
construction rather than by two manifests agreeing.
Cross-checked against the domain route that names the component
(CloudConfig::cross_ref_validate): a component mounted at /app
must be routed at /app or /app/*, because a disagreement means
requests land on a prefix nothing published to — a 404 whose cause is
two files apart.
wave: u32Sync-wave index (0-based). Components in wave 0 roll out in parallel first; the reconciler waits for all wave-N components to become healthy before starting wave N+1. Defaults to 0 (all components in one wave).
deploy: DeployTierWhether this component ships inside the service’s one assembled bundle or as a deployed unit of its own (R870-F23).
This is the vocabulary R870-F15’s design needed and the config did not
have. [providers.bundle] is a per-mirror slot, so before this
there was no way to say “give this one component its own workload” at
all — the whole service was one bundle or it was nothing, and a service
whose components genuinely release on different cadences had no shape
to declare.
It is one field rather than a pair of flags on purpose: a component being both bundle-staged and its own workload is the second admission rule R870-F23 was asked to enforce, and an enum makes it unrepresentable instead of merely refused.
Trait Implementations§
Source§impl Clone for ServiceComponent
impl Clone for ServiceComponent
Source§fn clone(&self) -> ServiceComponent
fn clone(&self) -> ServiceComponent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServiceComponent
impl Debug for ServiceComponent
Source§impl<'de> Deserialize<'de> for ServiceComponent
impl<'de> Deserialize<'de> for ServiceComponent
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 ServiceComponent
impl RefUnwindSafe for ServiceComponent
impl Send for ServiceComponent
impl Sync for ServiceComponent
impl Unpin for ServiceComponent
impl UnsafeUnpin for ServiceComponent
impl UnwindSafe for ServiceComponent
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