pub struct AuthenticatedParticipantRuntime<'a, B: SagaBackend> { /* private fields */ }Expand description
业务作用:表示已命中至少一条 Participant 信任投影的 command producer 能力。
非 Kafka transport 应在校验 mTLS、签名或独占通道后创建本视图;其后所有 phase 调用都复用 同一受信身份,避免某个分支遗漏 producer 参数又退回未认证入口。
Implementations§
Source§impl<B> AuthenticatedParticipantRuntime<'_, B>where
B: SagaBackend + SagaBackendFactory,
impl<B> AuthenticatedParticipantRuntime<'_, B>where
B: SagaBackend + SagaBackendFactory,
Sourcepub async fn execute<S>(
&self,
service: &S,
envelope: &SagaCommandEnvelope,
allow_unknown: bool,
) -> Result<ParticipantHandled>
pub async fn execute<S>( &self, service: &S, envelope: &SagaCommandEnvelope, allow_unknown: bool, ) -> Result<ParticipantHandled>
业务作用:以已绑定 producer 执行 execute 的完整本地事务。
参数说明:
service: 业务步骤实现。envelope: 已由同一 transport 收据认证的命令。allow_unknown: definition 是否允许正向 Unknown。
返回:事务提交后返回可 ACK 结论;否则返回拒绝或可重试错误。
Sourcepub async fn cancel_local(
&self,
envelope: &SagaCommandEnvelope,
) -> Result<ParticipantHandled>
pub async fn cancel_local( &self, envelope: &SagaCommandEnvelope, ) -> Result<ParticipantHandled>
业务作用:以已绑定 producer 执行本地可围栏取消裁决。
参数说明:
envelope: 已由同一 transport 收据认证的取消命令。
返回:取消屏障与结果提交后返回可 ACK 结论;否则返回拒绝或基础设施错误。
Sourcepub async fn cancel_external<C>(
&self,
service: &C,
envelope: &SagaCommandEnvelope,
) -> Result<ParticipantHandled>
pub async fn cancel_external<C>( &self, service: &C, envelope: &SagaCommandEnvelope, ) -> Result<ParticipantHandled>
业务作用:以已绑定 producer 执行类型化外部取消裁决。
参数说明:
service: 外部取消服务实现。envelope: 已认证取消命令。
返回:外部裁决、gate 与结果原子提交后返回可 ACK 结论;否则返回错误。
Sourcepub async fn compensate<S>(
&self,
service: &S,
envelope: &SagaCommandEnvelope,
) -> Result<ParticipantHandled>
pub async fn compensate<S>( &self, service: &S, envelope: &SagaCommandEnvelope, ) -> Result<ParticipantHandled>
业务作用:以已绑定 producer 执行补偿或受审计 HALTED 恢复。
参数说明:
service: 补偿业务实现。envelope: 已认证补偿命令。
返回:补偿事实与结果提交后返回可 ACK 结论;否则返回拒绝或可重试错误。
Sourcepub async fn resolve<R>(
&self,
service: &R,
envelope: &SagaCommandEnvelope,
) -> Result<ParticipantHandled>
pub async fn resolve<R>( &self, service: &R, envelope: &SagaCommandEnvelope, ) -> Result<ParticipantHandled>
业务作用:以已绑定 producer 执行 Unknown 查询或受审计 HALTED resolve 恢复。
参数说明:
service: 类型化查询实现。envelope: 已认证 resolve 命令。
返回:查询裁决与结果提交后返回可 ACK 结论;否则返回拒绝或可重试错误。
Auto Trait Implementations§
impl<'a, B> Forget for AuthenticatedParticipantRuntime<'a, B>
impl<'a, B> Freeze for AuthenticatedParticipantRuntime<'a, B>where
&'a ParticipantRuntime<B>: Freeze,
impl<'a, B> Move for AuthenticatedParticipantRuntime<'a, B>
impl<'a, B> RefUnwindSafe for AuthenticatedParticipantRuntime<'a, B>where
&'a ParticipantRuntime<B>: RefUnwindSafe,
impl<'a, B> Send for AuthenticatedParticipantRuntime<'a, B>where
&'a ParticipantRuntime<B>: Send,
impl<'a, B> Sync for AuthenticatedParticipantRuntime<'a, B>where
&'a ParticipantRuntime<B>: Sync,
impl<'a, B> Unpin for AuthenticatedParticipantRuntime<'a, B>where
&'a ParticipantRuntime<B>: Unpin,
impl<'a, B> UnsafeUnpin for AuthenticatedParticipantRuntime<'a, B>where
&'a ParticipantRuntime<B>: UnsafeUnpin,
impl<'a, B> UnwindSafe for AuthenticatedParticipantRuntime<'a, B>where
&'a ParticipantRuntime<B>: UnwindSafe,
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