pub struct Runner { /* private fields */ }Expand description
Immutable named route table.
Implementations§
Source§impl Runner
impl Runner
Sourcepub fn load(path: impl AsRef<Path>) -> Result<Self, RunnerError>
pub fn load(path: impl AsRef<Path>) -> Result<Self, RunnerError>
Loads and validates a version-1 deployment TOML file.
Sourcepub fn from_toml(source: &str) -> Result<Self, RunnerError>
pub fn from_toml(source: &str) -> Result<Self, RunnerError>
Loads and validates a version-1 deployment TOML document.
Use Self::load when the deployment is stored in a file.
Sourcepub fn new(routes: Vec<(ModelId, Route)>) -> Self
pub fn new(routes: Vec<(ModelId, Route)>) -> Self
Builds a runner from named routes in caller-provided order. Pre-condition: There must be at least one route.
Sourcepub fn with_provider_api_keys(self, keys: Vec<String>) -> Self
pub fn with_provider_api_keys(self, keys: Vec<String>) -> Self
Registers deployment-owned API keys for serving-surface output redaction. TOML loading registers these automatically; programmatic hosts must supply them.
Sourcepub fn provider_api_keys(&self) -> &[String]
pub fn provider_api_keys(&self) -> &[String]
Returns deployment-owned secrets for serving-surface output redactors.
Sourcepub fn models(&self) -> impl Iterator<Item = ModelInfo<'_>>
pub fn models(&self) -> impl Iterator<Item = ModelInfo<'_>>
Iterates over configured routes in caller-provided order.
Sourcepub async fn model_properties(
&self,
model: &str,
timeout: Duration,
) -> Option<Value>
pub async fn model_properties( &self, model: &str, timeout: Duration, ) -> Option<Value>
Reads one route’s configured local backend properties without exposing its credentials.
Sourcepub fn fallback_base_url(&self) -> Option<&str>
pub fn fallback_base_url(&self) -> Option<&str>
Returns the validated API root used for unmatched HTTP requests.
Sourcepub fn describe_decision(
&self,
model: &ModelId,
outcome: &RoutingOutcome,
) -> Option<DecisionDescription>
pub fn describe_decision( &self, model: &ModelId, outcome: &RoutingOutcome, ) -> Option<DecisionDescription>
Resolves an outcome to configured target names and non-secret client settings.