Skip to main content

vc_runtime/config/model/
profile.rs

1//! Runtime profile domain model.
2//!
3//! A profile selects a backend and provides runtime overrides.
4
5use serde::{Deserialize, Serialize};
6use std::path::PathBuf;
7
8/// Typed runtime override values.
9///
10/// All fields are optional. When present, these values override the
11/// corresponding backend configuration during runtime.
12#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
13#[serde(default)]
14pub struct RuntimeOverrides {
15    pub timeout_secs: Option<u64>,
16    pub poll_timeout_secs: Option<u64>,
17    pub poll_interval_ms: Option<u64>,
18    pub workflow_template_path: Option<PathBuf>,
19}
20
21/// A named runtime profile.
22///
23/// The name is external (key in `AppConfig.profiles` HashMap).
24/// A profile selects a backend by name and optionally provides
25/// typed overrides.
26#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
27pub struct RuntimeProfile {
28    /// Name of the backend selected by this profile.
29    pub backend_name: String,
30
31    #[serde(default)]
32    pub overrides: RuntimeOverrides,
33}