use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::time::Duration;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CanaryConfig {
pub enabled: bool,
pub initial_percentage: f64,
pub increment_percentage: f64,
pub promotion_criteria: PromotionCriteria,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PromotionCriteria {
pub success_metrics: HashMap<String, f64>,
pub failure_thresholds: HashMap<String, f64>,
pub observation_period: Duration,
}