Skip to main content

Crate adaptive_admission_core

Crate adaptive_admission_core 

Source
Expand description

Host-independent adaptive admission-control state machine.

The crate owns controller state and returns Action values for the embedding host to perform. It does not execute tasks, read clocks, or create timers.

use adaptive_admission_core::{Action, Config, Controller, Priority};

let mut controller = Controller::new(Config::default())?;
let submission = controller.submit(Priority::new(100)?, 1_000.into())?;
assert_eq!(
    submission.actions,
    vec![Action::Start { request_id: submission.request_id }],
);

Structs§

Config
Configuration for one controller instance.
Controller
Deterministic admission-control state machine.
ControllerDiagnostics
Current controller values intended for diagnostics and operational visualization.
PidConfig
Parameters for the admission PID feedback loop.
Priority
Request priority in the inclusive range 0..=767; lower values are more important.
RequestId
Identifier generated by one controller instance.
StatisticsConfig
Bounds and readiness criteria for execution statistics.
StatisticsSnapshot
Statistics published from one coherent execution window.
Submission
Result of submitting one request to the controller.
Timestamp
Monotonic timestamp expressed in milliseconds.

Enums§

Action
Decision that the embedding host must apply.
CancellationReason
Reason why queued work was cancelled.
ConfigError
Invalid controller configuration.
ControllerError
Failure to apply an event to the current controller state.
EvictionReason
Reason why queued work expired.
Outcome
Host-reported result of started work.
PriorityError
Invalid priority construction.
RejectionReason
Reason why submitted work was not admitted.