pub struct IntentPromoterConfig { /* private fields */ }Expand description
Polling and batch controls for durable enqueue-intent promotion.
crate::Supervisor derives these values from JobsConfig by default so
existing deployments keep their current behavior. Use this type when intent
traffic needs a cadence independent from ordinary queue claiming.
Implementations§
Source§impl IntentPromoterConfig
impl IntentPromoterConfig
pub const fn new(poll_interval: Duration, batch_size: i64) -> Self
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Reads intent-specific settings from the environment.
JOBS_INTENT_PROMOTER_POLL_INTERVAL_MS defaults to 500 milliseconds and
JOBS_INTENT_PROMOTER_BATCH_SIZE defaults to 16.
Sourcepub fn from_env_with_jobs_config_defaults(config: &JobsConfig) -> Self
pub fn from_env_with_jobs_config_defaults(config: &JobsConfig) -> Self
Reads intent-specific settings from the environment, inheriting worker settings for variables that are absent or invalid.
This is the environment-composition policy used by
crate::Supervisor::builder_from_env. It preserves the default
coupling between worker claiming and intent promotion while allowing
either promoter control to be overridden independently.
pub const fn from_jobs_config(config: &JobsConfig) -> Self
pub fn validate(&self) -> Result<(), JobsConfigValidationError>
pub const fn poll_interval(&self) -> Duration
pub const fn batch_size(&self) -> i64
Trait Implementations§
Source§impl Clone for IntentPromoterConfig
impl Clone for IntentPromoterConfig
Source§fn clone(&self) -> IntentPromoterConfig
fn clone(&self) -> IntentPromoterConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for IntentPromoterConfig
Source§impl Debug for IntentPromoterConfig
impl Debug for IntentPromoterConfig
impl Eq for IntentPromoterConfig
Source§impl PartialEq for IntentPromoterConfig
impl PartialEq for IntentPromoterConfig
impl StructuralPartialEq for IntentPromoterConfig
Auto Trait Implementations§
impl Freeze for IntentPromoterConfig
impl RefUnwindSafe for IntentPromoterConfig
impl Send for IntentPromoterConfig
impl Sync for IntentPromoterConfig
impl Unpin for IntentPromoterConfig
impl UnsafeUnpin for IntentPromoterConfig
impl UnwindSafe for IntentPromoterConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more