pub struct OperatorRequest { /* private fields */ }Expand description
One validated mutating operator request.
The request digest covers the action, target identity, expected version, and bounded arguments. Replaying an operation identifier with a different digest is a conflict rather than a repeat.
Implementations§
Source§impl OperatorRequest
impl OperatorRequest
Sourcepub fn launch(
operation_id: OperationId,
actor: ActorRef,
key: JobInstanceKey,
definition: DefinitionIdentity,
) -> Self
pub fn launch( operation_id: OperationId, actor: ActorRef, key: JobInstanceKey, definition: DefinitionIdentity, ) -> Self
Requests one launch of the instance selected by an identifying key.
Sourcepub fn restart(
operation_id: OperationId,
actor: ActorRef,
job_instance_id: JobInstanceId,
definition: DefinitionIdentity,
) -> Self
pub fn restart( operation_id: OperationId, actor: ActorRef, job_instance_id: JobInstanceId, definition: DefinitionIdentity, ) -> Self
Requests one restart attempt for an existing logical instance.
Sourcepub fn stop(
operation_id: OperationId,
actor: ActorRef,
job_execution_id: JobExecutionId,
expected_version: ExecutionVersion,
) -> Self
pub fn stop( operation_id: OperationId, actor: ActorRef, job_execution_id: JobExecutionId, expected_version: ExecutionVersion, ) -> Self
Requests one durable cooperative stop.
Sourcepub fn abandon(
operation_id: OperationId,
actor: ActorRef,
reason: ReasonCode,
job_execution_id: JobExecutionId,
expected_version: ExecutionVersion,
) -> Self
pub fn abandon( operation_id: OperationId, actor: ActorRef, reason: ReasonCode, job_execution_id: JobExecutionId, expected_version: ExecutionVersion, ) -> Self
Requests that one finished or recovered execution become ABANDONED.
Sourcepub fn recover(
operation_id: OperationId,
actor: ActorRef,
reason: ReasonCode,
directive: RecoveryDirective,
proposal: &RecoveryProposal,
) -> Self
pub fn recover( operation_id: OperationId, actor: ActorRef, reason: ReasonCode, directive: RecoveryDirective, proposal: &RecoveryProposal, ) -> Self
Requests one evidence-bound recovery decision.
Sourcepub const fn action(&self) -> OperatorAction
pub const fn action(&self) -> OperatorAction
Returns the requested action.
Returns the class a deployment authorizes before this call.
Sourcepub const fn operation_id(&self) -> &OperationId
pub const fn operation_id(&self) -> &OperationId
Borrows the caller-supplied idempotency key.
Sourcepub const fn reason(&self) -> Option<&ReasonCode>
pub const fn reason(&self) -> Option<&ReasonCode>
Borrows the closed-set reason code, when the action requires one.
Sourcepub const fn expected_version(&self) -> Option<ExecutionVersion>
pub const fn expected_version(&self) -> Option<ExecutionVersion>
Returns the observed optimistic version for a lifecycle mutation.
Sourcepub const fn digest(&self) -> &RequestDigest
pub const fn digest(&self) -> &RequestDigest
Returns the framework-computed canonical request digest.
Sourcepub const fn job_execution_id(&self) -> Option<JobExecutionId>
pub const fn job_execution_id(&self) -> Option<JobExecutionId>
Returns the targeted execution, when the action names one.
Sourcepub const fn job_instance_id(&self) -> Option<JobInstanceId>
pub const fn job_instance_id(&self) -> Option<JobInstanceId>
Returns the targeted logical instance, when the action names one.
Sourcepub fn job_instance_key(&self) -> Option<&JobInstanceKey>
pub fn job_instance_key(&self) -> Option<&JobInstanceKey>
Borrows the identifying key, when the action selects by key.
Only OperatorAction::Launch names one; every other action names an
instance or an execution.
Trait Implementations§
Source§impl Clone for OperatorRequest
impl Clone for OperatorRequest
Source§fn clone(&self) -> OperatorRequest
fn clone(&self) -> OperatorRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more