pub struct RuntimeConsumerRequirements { /* private fields */ }Expand description
Provider-neutral requirements imposed by one Runtime consumer profile.
This is an admission and readiness abstraction, not a wire-contract type. Callers retain ownership of their domain semantics and compose them from the two generic Runtime unit classes and advertised capabilities.
Implementations§
Source§impl RuntimeConsumerRequirements
impl RuntimeConsumerRequirements
pub fn new(unit_class: RuntimeUnitClass) -> Self
pub fn require_feature(self, feature: RuntimeFeature) -> Self
Sourcepub fn require_semantics_profile(self) -> Self
pub fn require_semantics_profile(self) -> Self
Requires the immutable consumer-owned semantics profile to be present in the specification and repeated by provider evidence.
Sourcepub fn require_health(self) -> Self
pub fn require_health(self) -> Self
Requires a Service readiness policy and a ready running observation.
Sourcepub fn require_service_lifecycle(self) -> Self
pub fn require_service_lifecycle(self) -> Self
Requires distinct Service liveness evidence plus a bounded graceful shutdown policy.
Sourcepub fn require_service_endpoints(self) -> Self
pub fn require_service_endpoints(self) -> Self
Requires a Service network declaration and exact observed endpoints.
Sourcepub fn require_identity_attestation(self) -> Self
pub fn require_identity_attestation(self) -> Self
Requires one opaque identity attachment in the desired specification and exact generation-bound provider attestation in the observation.
Sourcepub fn admit_spec(
&self,
spec: &RuntimeUnitSpec,
capabilities: &RuntimeCapabilities,
) -> RuntimeResult<()>
pub fn admit_spec( &self, spec: &RuntimeUnitSpec, capabilities: &RuntimeCapabilities, ) -> RuntimeResult<()>
Fails closed unless the immutable unit specification can be fulfilled by the selected provider and satisfies this consumer profile.
Sourcepub fn accept_observation(
&self,
spec: &RuntimeUnitSpec,
observation: &RuntimeObservation,
) -> RuntimeResult<()>
pub fn accept_observation( &self, spec: &RuntimeUnitSpec, observation: &RuntimeObservation, ) -> RuntimeResult<()>
Accepts an observation only when it is bound to the admitted unit and contains every readiness proof required by this consumer profile.
Trait Implementations§
Source§impl Clone for RuntimeConsumerRequirements
impl Clone for RuntimeConsumerRequirements
Source§fn clone(&self) -> RuntimeConsumerRequirements
fn clone(&self) -> RuntimeConsumerRequirements
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more