quantrs2_device/cloud/orchestration/load_balancing/
canary.rs1use serde::{Deserialize, Serialize};
4use std::collections::HashMap;
5use std::time::Duration;
6
7#[derive(Debug, Clone, Serialize, Deserialize)]
9pub struct CanaryConfig {
10 pub enabled: bool,
12 pub initial_percentage: f64,
14 pub increment_percentage: f64,
16 pub promotion_criteria: PromotionCriteria,
18}
19
20#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct PromotionCriteria {
23 pub success_metrics: HashMap<String, f64>,
25 pub failure_thresholds: HashMap<String, f64>,
27 pub observation_period: Duration,
29}