pub struct CooperativeDrainAdapter { /* private fields */ }Expand description
Cooperative drain adapter: supports Submit, safe-boundary Steer, Pause (via drain to safe boundary), Stop, and Observe. It truthfully exposes that in-flight pause and steer are not supported without killing processes.
Implementations§
Source§impl CooperativeDrainAdapter
impl CooperativeDrainAdapter
pub fn new(identity: impl Into<String>) -> CooperativeDrainAdapter
pub fn set_completion(&self, invocation_id: &str, output: Value)
Trait Implementations§
Source§impl NodeCapabilityAdapter for CooperativeDrainAdapter
impl NodeCapabilityAdapter for CooperativeDrainAdapter
Source§fn adapter_identity(&self) -> &str
fn adapter_identity(&self) -> &str
Unique identity of this adapter.
Source§fn declared_capabilities(&self) -> BTreeSet<NodeCapability>
fn declared_capabilities(&self) -> BTreeSet<NodeCapability>
Truthful set of declared capabilities.
Source§fn supports_inflight_steer(&self) -> bool
fn supports_inflight_steer(&self) -> bool
Whether native in-flight steering is supported (without killing process).
Source§fn supports_inflight_pause(&self) -> bool
fn supports_inflight_pause(&self) -> bool
Whether native in-flight suspension is supported (without killing process).
Source§fn supports_cooperative_cancel(&self) -> bool
fn supports_cooperative_cancel(&self) -> bool
Whether cooperative cancellation is acknowledged.
Source§fn start_invocation(
&self,
invocation: &NodeInvocation,
) -> Result<(), AdapterError>
fn start_invocation( &self, invocation: &NodeInvocation, ) -> Result<(), AdapterError>
Start a new invocation.
Source§fn steer_invocation(
&self,
invocation_id: &str,
instruction: &str,
) -> Result<SteerOutcome, AdapterError>
fn steer_invocation( &self, invocation_id: &str, instruction: &str, ) -> Result<SteerOutcome, AdapterError>
Deliver steer intervention to an active invocation.
Source§fn pause_invocation(
&self,
invocation_id: &str,
) -> Result<PauseOutcome, AdapterError>
fn pause_invocation( &self, invocation_id: &str, ) -> Result<PauseOutcome, AdapterError>
Request pause of an active invocation.
Source§fn resume_invocation(
&self,
invocation_id: &str,
) -> Result<ResumeOutcome, AdapterError>
fn resume_invocation( &self, invocation_id: &str, ) -> Result<ResumeOutcome, AdapterError>
Request resume of a paused invocation.
Source§fn cancel_invocation(
&self,
invocation_id: &str,
) -> Result<CancelOutcome, AdapterError>
fn cancel_invocation( &self, invocation_id: &str, ) -> Result<CancelOutcome, AdapterError>
Cooperatively cancel an invocation.
Source§fn poll_status(
&self,
invocation_id: &str,
) -> Result<AdapterExecutionStatus, AdapterError>
fn poll_status( &self, invocation_id: &str, ) -> Result<AdapterExecutionStatus, AdapterError>
Poll execution status.
Auto Trait Implementations§
impl Forget for CooperativeDrainAdapter
impl Freeze for CooperativeDrainAdapter
impl Move for CooperativeDrainAdapter
impl RefUnwindSafe for CooperativeDrainAdapter
impl Send for CooperativeDrainAdapter
impl Sync for CooperativeDrainAdapter
impl Unpin for CooperativeDrainAdapter
impl UnsafeUnpin for CooperativeDrainAdapter
impl UnwindSafe for CooperativeDrainAdapter
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