use crate::hub::tools::config::Config;
use crate::hub::tools::metrics::Metrics;
pub struct ExecutionContext {
pub config: Config,
pub metrics: Metrics,
pub dry_run: bool,
pub verbose: bool,
}
impl ExecutionContext {
pub fn new() -> Self {
Self {
config: Config::new(),
metrics: Metrics::new(),
dry_run: false,
verbose: false,
}
}
pub fn with_config(mut self, config: Config) -> Self {
self.config = config;
self
}
pub fn with_dry_run(mut self, dry_run: bool) -> Self {
self.dry_run = dry_run;
self
}
pub fn with_verbose(mut self, verbose: bool) -> Self {
self.verbose = verbose;
self
}
}
impl Default for ExecutionContext {
fn default() -> Self {
Self::new()
}
}