pub struct ApplyOpts {
pub max_in_flight: usize,
pub batch_size: usize,
pub batch_max_wait: Duration,
pub timeout: Duration,
pub failure_policy: FailurePolicy,
}Expand description
Options for crate::pipeline::run_change_feed, crate::pipeline::write_rows, and
crate::pipeline::ApplyContext.
max_in_flight is the apply window size (default 1): concurrent
transforms plus batches awaiting/in ordered sink. W=1 and W=16 share the
same runtime — reads may overlap transforms and ordered writes; source
watermark advance stays after sink success.
Fields§
§max_in_flight: usizeMaximum batches in the apply window (transforming + awaiting/in sink). Default: 1.
batch_size: usizeAccumulate this many changes before starting a transform batch. Default: 1000.
batch_max_wait: DurationFlush a partial batch after this idle wait. Default: 500ms.
timeout: DurationPer-batch transform timeout. Default: 60s.
failure_policy: FailurePolicyTransform / sink failure handling.
Default: FailurePolicy::Fail.
Implementations§
Source§impl ApplyOpts
impl ApplyOpts
Sourcepub fn identity() -> Self
pub fn identity() -> Self
Apply options for an identity (no-config) sync path.
Pins max_in_flight = 1 and batch_size = 1 so omit---transforms-config
keeps per-event CDC cadence (no multi-change buffering, no overlapping
transform window). Full-sync / ad-hoc helpers still go through the same
crate::pipeline::ApplyContext path; there is no separate oneshot bypass.
Sourcepub fn with_max_in_flight(self, n: usize) -> Self
pub fn with_max_in_flight(self, n: usize) -> Self
Builder: set in-flight window size (clamped to at least 1).
Sourcepub fn with_batch_size(self, n: usize) -> Self
pub fn with_batch_size(self, n: usize) -> Self
Builder: set batch size (clamped to at least 1).
Sourcepub fn with_batch_max_wait(self, d: Duration) -> Self
pub fn with_batch_max_wait(self, d: Duration) -> Self
Builder: set max wait before flushing a partial batch.
Sourcepub fn with_timeout(self, d: Duration) -> Self
pub fn with_timeout(self, d: Duration) -> Self
Builder: set per-batch transform timeout.
Sourcepub fn with_failure_policy(self, policy: FailurePolicy) -> Self
pub fn with_failure_policy(self, policy: FailurePolicy) -> Self
Builder: set failure policy.
Source§impl ApplyOpts
impl ApplyOpts
Sourcepub fn from_transforms_config(cfg: &TransformsConfig) -> Self
pub fn from_transforms_config(cfg: &TransformsConfig) -> Self
Derive apply options from [pipeline] (defaults when unset).
Trait Implementations§
impl Eq for ApplyOpts
impl StructuralPartialEq for ApplyOpts
Auto Trait Implementations§
impl Freeze for ApplyOpts
impl RefUnwindSafe for ApplyOpts
impl Send for ApplyOpts
impl Sync for ApplyOpts
impl Unpin for ApplyOpts
impl UnsafeUnpin for ApplyOpts
impl UnwindSafe for ApplyOpts
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§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.