pub enum BandwidthClassSupportProbe {
AlwaysSupported,
ForceForeground,
Dynamic(Box<dyn Fn() -> bool + Send + Sync>),
}Expand description
Producer-side hook for the bandwidth-class downgrade decision.
Mirrors super::blob_tree::TreeSupportProbe /
super::cdc::CdcSupportProbe /
super::erasure::ErasureSupportProbe one-for-one — same
enum shape, same default-impl, same dynamic-closure variant
for runtime flag-driven decisions.
Behavior: callers pass a BandwidthClass alongside a probe;
on probe.check() == false the substrate substitutes
BandwidthClass::Foreground (the conservative choice — a
Background-class request that lands on a non-D-aware peer is
served as Foreground rather than failing). Foreground stays
Foreground; Realtime degrades to Foreground (preserves
liveness; gives up the rate-bypass that the legacy peer can’t
honour anyway).
Variants§
AlwaysSupported
All targets support the class hint. Default for single- cluster all-Phase-D deployments.
ForceForeground
No target supports the class hint. Forces every call to
Foreground. Useful during cluster-wide rollouts.
Dynamic(Box<dyn Fn() -> bool + Send + Sync>)
Dynamic check — caller-supplied closure consults the
capability-tag advertisement layer at decision time.
Returns true iff the destination advertises
DATAFORTS_BLOB_BANDWIDTH_CLASS_SUPPORTED.