pub struct BackpressureParams {
pub high_bytes: usize,
pub low_bytes: usize,
pub min_pause: Duration,
}Expand description
Hysteresis parameters for one pipeline’s watermark controller.
Struct literals are accepted as-is for config wiring;
BackpressureParams::from_budget validates its inputs. The controller
assumes low_bytes <= high_bytes.
Fields§
§high_bytes: usizePause when InflightBudget::usage reaches this many bytes.
low_bytes: usizeResume only once usage is at or below this many bytes.
min_pause: DurationMinimum time to stay paused. Bounds the pause/resume flap rate and amortizes the prefetch purge that pausing a source implies (a paused Kafka partition drops its prefetched messages and refetches on resume — spike-verified).
Implementations§
Source§impl BackpressureParams
impl BackpressureParams
Sourcepub fn from_budget(
max_inflight_bytes: usize,
high_ratio: f64,
low_ratio: f64,
min_pause: Duration,
) -> BackpressureParams
pub fn from_budget( max_inflight_bytes: usize, high_ratio: f64, low_ratio: f64, min_pause: Duration, ) -> BackpressureParams
Derive watermarks from a byte budget and ratios.
§Panics
Panics unless max_inflight_bytes > 0 and
0.0 < low_ratio <= high_ratio <= 1.0 — these are programmer
errors; user-facing validation happens at config load.
Trait Implementations§
Source§impl Clone for BackpressureParams
impl Clone for BackpressureParams
Source§fn clone(&self) -> BackpressureParams
fn clone(&self) -> BackpressureParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackpressureParams
impl Debug for BackpressureParams
Source§impl PartialEq for BackpressureParams
impl PartialEq for BackpressureParams
Source§fn eq(&self, other: &BackpressureParams) -> bool
fn eq(&self, other: &BackpressureParams) -> bool
self and other values to be equal, and is used by ==.impl Copy for BackpressureParams
impl Eq for BackpressureParams
impl StructuralPartialEq for BackpressureParams
Auto Trait Implementations§
impl Freeze for BackpressureParams
impl RefUnwindSafe for BackpressureParams
impl Send for BackpressureParams
impl Sync for BackpressureParams
impl Unpin for BackpressureParams
impl UnsafeUnpin for BackpressureParams
impl UnwindSafe for BackpressureParams
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.