Skip to main content

OrchestratorConfig

Struct OrchestratorConfig 

Source
pub struct OrchestratorConfig {
    pub inbox_consumer: String,
    pub cancel_max_attempts: u32,
    pub compensate_max_attempts: u32,
    pub resolve_max_attempts: u32,
    pub timer_claim_limit: u32,
    pub timer_lease_ms: i64,
    pub pause_backoff_ms: i64,
    pub startup_scan_limit: u32,
    pub tenant_quotas: BTreeMap<String, u64>,
    pub tenant_action_rates: BTreeMap<String, TenantActionRate>,
    pub enable_manual_close: bool,
}
Expand description

业务作用:Orchestrator 的运行参数;全部预算有界,自动状态不允许无限滞留。

Fields§

§inbox_consumer: String

Orchestrator result Inbox 的小写 canonical consumer 名称。

§cancel_max_attempts: u32

取消命令的最大 attempt 数;耗尽升级人工介入。

§compensate_max_attempts: u32

补偿命令的最大 attempt 数;耗尽升级人工介入,不伪造 COMPENSATED。

§resolve_max_attempts: u32

解决查询的最大 attempt 数;耗尽升级人工介入,不自动转 Rejected。

§timer_claim_limit: u32

单轮 timer 领取上限。

§timer_lease_ms: i64

timer 租约时长(毫秒)。

§pause_backoff_ms: i64

实例暂停时 timer 的轮询退避(毫秒);只是轮询节奏,不顺延业务 deadline。

§startup_scan_limit: u32

启动预检扫描非终态实例的上限。

§tenant_quotas: BTreeMap<String, u64>

每租户在飞实例上限(冻结表)。

未列出的租户不设限但仍精确记账(“先观测,不拒绝“档);列出的租户在创建事务内 原子预留,超限以稳定原因码拒绝新建、不影响已在飞实例收敛。上限只作用于创建, 配额拒绝与系统故障可区分,且不泄漏其它租户用量。

§tenant_action_rates: BTreeMap<String, TenantActionRate>

每租户变更类管理动作的速率上限(冻结表)。

覆盖 pause/resume/retry-compensation/retry-resolution/manual-close 五个会向恢复 通道注入外部副作用的动作;只读动作(检索、审计、用量查询)不占预算。未列出的 租户不限速且不写账本;max_actions = 0 表示完全封禁该租户的变更类管理动作。 预算与动作事务同提交:动作失败回滚时预算退还,拒绝携带稳定原因码并与系统 故障可区分,不泄漏其它租户用量。

§enable_manual_close: bool

人工关闭(MANUALLY_CLOSED)管理动作的受信能力开关。

滚动升级门禁:新终态一旦落库就不可回退,必须先让全部副本升级为能解析 MANUALLY_CLOSED 的读者,再由部署方打开本开关放行管理动作。默认关闭—— 未显式开启的部署是“可读不产生“的兼容读者。

Trait Implementations§

Source§

impl Clone for OrchestratorConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OrchestratorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OrchestratorConfig

Source§

fn default() -> Self

业务作用:给出保守默认预算,保证未显式配置的部署也有有界收敛行为。

参数说明: 无。

返回:默认配置。

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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