pub struct CogKind;Expand description
Native, container and Seed-hosted cog packages.
Trait Implementations§
impl Copy for CogKind
Source§impl WorkloadKind for CogKind
impl WorkloadKind for CogKind
Source§fn validate(&self, envelope: &ManifestEnvelope) -> Result<(), ManifestError>
fn validate(&self, envelope: &ManifestEnvelope) -> Result<(), ManifestError>
Validate the envelope’s kind-specific body (shape and limits; not
signatures or file contents, which are kind-agnostic).
Source§fn load(
&self,
package_dir: &Path,
anchors: &TrustAnchors,
kinds: &KindRegistry,
) -> Result<VerifiedWorkload, PlaneError>
fn load( &self, package_dir: &Path, anchors: &TrustAnchors, kinds: &KindRegistry, ) -> Result<VerifiedWorkload, PlaneError>
Verify the signed package in
package_dir against anchors (with
kinds as the registry the manifest is checked against) and load it
as a runnable workload. Must refuse a manifest whose kind is not
id.Source§fn spec(&self, workload: &VerifiedWorkload) -> Result<WorkloadSpec, String>
fn spec(&self, workload: &VerifiedWorkload) -> Result<WorkloadSpec, String>
The placement requirements for a loaded workload of this kind.
Source§fn adapters(&self) -> &'static [&'static str]
fn adapters(&self) -> &'static [&'static str]
Adapter route names that can run this kind (
native, container,
emulated, remote.api, …).Source§fn health(&self) -> HealthSpec
fn health(&self) -> HealthSpec
How often instances of this kind are polled and how many bad polls
in a row make one unhealthy (ADR-099 section 7).
Source§fn judge(&self, sample: &HealthSample) -> Health
fn judge(&self, sample: &HealthSample) -> Health
Judge one poll of an instance of this kind. The default is the
process-backed judgment (
judge_process).Source§fn migratable(&self) -> bool
fn migratable(&self) -> bool
Whether the placer may move an instance of this kind to another
node when its node is lost. A kind with state that cannot move (warm
inference caches, hardware-bound work) says
false: the loss is
raised as an alert instead of being rescheduled.Auto Trait Implementations§
impl Freeze for CogKind
impl RefUnwindSafe for CogKind
impl Send for CogKind
impl Sync for CogKind
impl Unpin for CogKind
impl UnsafeUnpin for CogKind
impl UnwindSafe for CogKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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