pub struct HotPathDeadlineConfig {
pub guard_pipeline_budget_ms: u64,
pub per_guard_budget_ms: BTreeMap<String, u64>,
pub always_offload_guards: bool,
pub dispatch_budget_ms: u64,
pub per_server_dispatch_budget_ms: BTreeMap<String, u64>,
pub receipt_append_budget_ms: u64,
pub receipt_writer_poll_ms: u64,
pub receipt_writer_stall_ms: u64,
}Expand description
Wall-clock budgets for the mediation hot path. All values are milliseconds.
0 means “no deadline” (unbounded) for the opt-in guard and dispatch
budgets, so a deployment that never sets one runs byte-for-byte as it did
before deadlines existed. The receipt-append budget may not be 0: an
unbounded wedged-writer stall is never a valid posture, so it is rejected at
load time and floor-clamped at read time as defense in depth.
Fields§
§guard_pipeline_budget_ms: u64Budget for the whole guard pipeline, enforced around run_guards.
0 disables (preserves the inline path).
per_guard_budget_ms: BTreeMap<String, u64>Per-guard overrides keyed by Guard::name(). A named guard is enforced
against its own budget instead of the pipeline budget; 0 disables the
override for that guard. Any entry forces per-guard offload. A BTreeMap
keeps the canonical key order deterministic.
always_offload_guards: boolOffload the guard pipeline to spawn_blocking even with no budget set,
so a blocking guard never pins an async worker. Default false.
dispatch_budget_ms: u64Default per-dispatch budget, enforced around the tool-server call.
0 disables. Default 0.
per_server_dispatch_budget_ms: BTreeMap<String, u64>Per-tool-server dispatch overrides keyed by ServerId string.
receipt_append_budget_ms: u64Watchdog bound on one receipt-append round trip through the commit
actor. Must be >= MIN_RECEIPT_APPEND_BUDGET_MS. Default 5000.
receipt_writer_poll_ms: u64Writer-liveness watchdog poll cadence.
receipt_writer_stall_ms: u64Staleness threshold before a stuck writer is judged wedged.
Implementations§
Source§impl HotPathDeadlineConfig
impl HotPathDeadlineConfig
Sourcepub fn validate(&self) -> Result<(), KernelBuildError>
pub fn validate(&self) -> Result<(), KernelBuildError>
Fail-closed load-time validation, run before kernel construction and mirrored in the config-file validator.
pub fn guard_pipeline_budget(&self) -> Option<Duration>
pub fn guard_budget_for(&self, name: &str) -> Option<Duration>
pub fn dispatch_budget_for(&self, server_id: &str) -> Option<Duration>
Sourcepub fn receipt_append_budget(&self) -> Duration
pub fn receipt_append_budget(&self) -> Duration
Effective append bound, clamped to the floor so a host that constructs a
KernelConfig without running validation still never gets an unbounded
(or below-floor) append.
Trait Implementations§
Source§impl Clone for HotPathDeadlineConfig
impl Clone for HotPathDeadlineConfig
Source§fn clone(&self) -> HotPathDeadlineConfig
fn clone(&self) -> HotPathDeadlineConfig
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 HotPathDeadlineConfig
impl Debug for HotPathDeadlineConfig
Auto Trait Implementations§
impl Freeze for HotPathDeadlineConfig
impl RefUnwindSafe for HotPathDeadlineConfig
impl Send for HotPathDeadlineConfig
impl Sync for HotPathDeadlineConfig
impl Unpin for HotPathDeadlineConfig
impl UnsafeUnpin for HotPathDeadlineConfig
impl UnwindSafe for HotPathDeadlineConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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