Skip to main content

AuthenticatedParticipantRuntime

Struct AuthenticatedParticipantRuntime 

Source
pub struct AuthenticatedParticipantRuntime<'a, B: SagaBackend> { /* private fields */ }
Expand description

业务作用:表示已命中至少一条 Participant 信任投影的 command producer 能力。

非 Kafka transport 应在校验 mTLS、签名或独占通道后创建本视图;其后所有 phase 调用都复用 同一受信身份,避免某个分支遗漏 producer 参数又退回未认证入口。

Implementations§

Source§

impl<B> AuthenticatedParticipantRuntime<'_, B>

Source

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 结论;否则返回拒绝或可重试错误。

Source

pub async fn cancel_local( &self, envelope: &SagaCommandEnvelope, ) -> Result<ParticipantHandled>

业务作用:以已绑定 producer 执行本地可围栏取消裁决。

参数说明:

  • envelope: 已由同一 transport 收据认证的取消命令。

返回:取消屏障与结果提交后返回可 ACK 结论;否则返回拒绝或基础设施错误。

Source

pub async fn cancel_external<C>( &self, service: &C, envelope: &SagaCommandEnvelope, ) -> Result<ParticipantHandled>

业务作用:以已绑定 producer 执行类型化外部取消裁决。

参数说明:

  • service: 外部取消服务实现。
  • envelope: 已认证取消命令。

返回:外部裁决、gate 与结果原子提交后返回可 ACK 结论;否则返回错误。

Source

pub async fn compensate<S>( &self, service: &S, envelope: &SagaCommandEnvelope, ) -> Result<ParticipantHandled>

业务作用:以已绑定 producer 执行补偿或受审计 HALTED 恢复。

参数说明:

  • service: 补偿业务实现。
  • envelope: 已认证补偿命令。

返回:补偿事实与结果提交后返回可 ACK 结论;否则返回拒绝或可重试错误。

Source

pub async fn resolve<R>( &self, service: &R, envelope: &SagaCommandEnvelope, ) -> Result<ParticipantHandled>

业务作用:以已绑定 producer 执行 Unknown 查询或受审计 HALTED resolve 恢复。

参数说明:

  • service: 类型化查询实现。
  • envelope: 已认证 resolve 命令。

返回:查询裁决与结果提交后返回可 ACK 结论;否则返回拒绝或可重试错误。

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more