Skip to main content

ModuleManagementEngine

Struct ModuleManagementEngine 

Source
pub struct ModuleManagementEngine<S> { /* private fields */ }

Implementations§

Source§

impl<S> ModuleManagementEngine<S>

Source

pub fn new(store: S) -> Self

Source

pub fn store(&self) -> &S

Source

pub fn start( &self, request: StartModuleOperation<'_>, ) -> Result<ModuleOperation, ModuleManagementError>

Source

pub fn submit_approval( &self, operation_id: &str, expected_revision: u64, plan: &ModuleChangePlan, policy: &ModuleEnvironmentPolicy, requester: &ManagementActor, approval: ModuleApproval, holder_id: &str, now: DateTime<Utc>, ) -> Result<ModuleOperation, ModuleManagementError>

Source

pub fn advance( &self, request: AdvanceModuleOperation, ) -> Result<ModuleOperation, ModuleManagementError>

Source

pub fn retry_blocked( &self, operation_id: &str, expected_revision: u64, next_state: ModuleOperationState, holder_id: &str, maximum_lease_seconds: u64, actor_id: &str, now: DateTime<Utc>, ) -> Result<ModuleOperation, ModuleManagementError>

Source

pub fn begin_workspace_application( &self, operation_id: &str, expected_revision: u64, fencing_token: u64, actor_id: &str, plan: &ModuleChangePlan, backups: Vec<ModuleWorkspaceBackup>, evidence_references: Vec<ArtifactReference>, now: DateTime<Utc>, ) -> Result<ModuleOperation, ModuleManagementError>

Source

pub fn record_effect_receipt( &self, operation_id: &str, expected_revision: u64, fencing_token: u64, actor_id: &str, receipt: ModuleEffectReceipt, now: DateTime<Utc>, ) -> Result<ModuleOperation, ModuleManagementError>

Source

pub fn resume_after_crash( &self, operation_id: &str, expected_revision: u64, evidence: &ModuleResumeEvidence, holder_id: &str, maximum_lease_seconds: u64, actor_id: &str, now: DateTime<Utc>, ) -> Result<ModuleOperation, ModuleManagementError>

Source

pub fn reconcile_with_succeeded_repair( &self, operation_id: &str, expected_revision: u64, repair_plan: &ModuleRepairPlan, repair_change_plan: &ModuleChangePlan, repair_operation_id: &str, actor_id: &str, evidence_references: Vec<ArtifactReference>, now: DateTime<Utc>, ) -> Result<ModuleOperation, ModuleManagementError>

Source

pub fn acquire_lease( &self, application_id: &str, holder_id: &str, maximum_lease_seconds: u64, now: DateTime<Utc>, ) -> Result<ModuleOperationLease, ModuleManagementError>

Source

pub fn release_lease( &self, holder_id: &str, fencing_token: u64, ) -> Result<(), ModuleManagementError>

Trait Implementations§

Source§

impl<S: Debug> Debug for ModuleManagementEngine<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.