pub struct DataPlaneSdk<C: TransactionalContext>(/* private fields */);Implementations§
Source§impl<C> DataPlaneSdk<C>where
C: TransactionalContext,
impl<C> DataPlaneSdk<C>where
C: TransactionalContext,
pub fn builder(ctx: C) -> DataPlaneSdkBuilder<C>
Methods from Deref<Target = DataPlaneSdkInternal<C>>§
pub async fn start( &self, participant_context_id: &str, control_plane_id: &str, req: DataFlowStartMessage, ) -> SdkResult<DataFlowStatusMessage>
pub async fn prepare( &self, participant_context_id: &str, control_plane_id: &str, req: DataFlowPrepareMessage, ) -> SdkResult<DataFlowStatusMessage>
pub async fn terminate( &self, _ctx: &str, flow_id: &str, reason: Option<String>, ) -> SdkResult<()>
pub async fn started( &self, _ctx: &str, flow_id: &str, msg: DataFlowStartedNotificationMessage, ) -> SdkResult<()>
pub async fn completed(&self, _ctx: &str, flow_id: &str) -> SdkResult<()>
pub async fn suspend( &self, _ctx: &str, flow_id: &str, reason: Option<String>, ) -> SdkResult<()>
pub async fn resume( &self, _ctx: &str, flow_id: &str, msg: DataFlowResumeMessage, ) -> SdkResult<DataFlowStatusMessage>
pub async fn status( &self, _ctx: &str, flow_id: &str, ) -> SdkResult<DataFlowStatusResponseMessage>
Sourcepub async fn notify_prepared(
&self,
ctx: &str,
flow_id: &str,
data_address: Option<DataAddress>,
) -> SdkResult<()>
pub async fn notify_prepared( &self, ctx: &str, flow_id: &str, data_address: Option<DataAddress>, ) -> SdkResult<()>
Notifies the control plane that the data flow has been prepared, by
POSTing to the URL of the flow’s referenced control plane (resolved from
control_plane_id). See the Data Plane Signaling “Control Plane
Endpoint” section.
Sourcepub async fn notify_started(
&self,
ctx: &str,
flow_id: &str,
data_address: Option<DataAddress>,
) -> SdkResult<()>
pub async fn notify_started( &self, ctx: &str, flow_id: &str, data_address: Option<DataAddress>, ) -> SdkResult<()>
Notifies the control plane that the data flow has started.
Sourcepub async fn notify_completed(&self, ctx: &str, flow_id: &str) -> SdkResult<()>
pub async fn notify_completed(&self, ctx: &str, flow_id: &str) -> SdkResult<()>
Notifies the control plane that the data flow has completed.
Sourcepub async fn notify_errored(
&self,
ctx: &str,
flow_id: &str,
error: Option<String>,
) -> SdkResult<()>
pub async fn notify_errored( &self, ctx: &str, flow_id: &str, error: Option<String>, ) -> SdkResult<()>
Notifies the control plane that the data flow has errored. The optional
error is forwarded as the error field of the status message.
pub async fn fetch_by_id( &self, tx: &mut C::Transaction, flow_id: &str, ) -> SdkResult<Option<DataFlow>>
pub fn ctx(&self) -> &C
Trait Implementations§
Source§impl<C> Clone for DataPlaneSdk<C>where
C: TransactionalContext,
impl<C> Clone for DataPlaneSdk<C>where
C: TransactionalContext,
Source§impl<C> Deref for DataPlaneSdk<C>where
C: TransactionalContext,
impl<C> Deref for DataPlaneSdk<C>where
C: TransactionalContext,
Auto Trait Implementations§
impl<C> !RefUnwindSafe for DataPlaneSdk<C>
impl<C> !UnwindSafe for DataPlaneSdk<C>
impl<C> Freeze for DataPlaneSdk<C>
impl<C> Send for DataPlaneSdk<C>
impl<C> Sync for DataPlaneSdk<C>
impl<C> Unpin for DataPlaneSdk<C>
impl<C> UnsafeUnpin for DataPlaneSdk<C>
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