pub fn run(settings: &settings::Settings) {
    log::info!("running forwarder");
    // let things settle down before diving in...
    std::thread::sleep(std::time::Duration::from_millis(750));
    // pull the forwarder info out of the additoanl hash map
    //
    for a in &settings.additional {
        if let Some(v) = a.get(&settings::Additional::Forwarder) {
            // v is a variant in AdditionalVariant, need to extract things info the Forwarder
            let f = match v.clone() {
                settings::AdditionalVariant::Forwarder {
                    run,
                    default,
                    daisy_chain,
                    fanout_fanin,
                    chaos_monkey,
                } => ForwarderSettings {
                    run,
                    default,
                    daisy_chain,
                    fanout_fanin,
                    chaos_monkey,
                },
            };
            // at this point f represents the Forwarder parameters
            for r in &f.run {
                match r {
                    settings::Field::daisy_chain => run_daisy_chain(&f),
                    settings::Field::fanout_fanin => run_fanout_fanin(&f),
                    settings::Field::chaos_monkey => run_chaos_monkey(&f),
                    _ => (),
                }
            }
        }
    }
}
/// Take the setting from the variant and turn them into a concrete stuct that we can
/// pass around. Probably could do this with a trait...
Take the setting from the variant and turn them into a concrete stuct that we can
pass around. Probably could do this with a trait
Take the setting from the variant and turn them into a concrete stuct that we can pass around . Probably could do this with a trait
pub fn run(settings: &settings::Settings) {
    log::info!("running forwarder");
    // let things settle down before diving in...
    std::thread::sleep(std::time::Duration::from_millis(750));
    // pull the forwarder info out of the additoanl hash map
    //
    for a in &settings.additional {
        if let Some(v) = a.get(&settings::Additional::Forwarder) {
            // v is a variant in AdditionalVariant, need to extract things info the Forwarder
            let f = match v.clone() {
                settings::AdditionalVariant::Forwarder {
                    run,
                    default,
                    daisy_chain,
                    fanout_fanin,
                    chaos_monkey,
                } => ForwarderSettings {
                    run,
                    default,
                    daisy_chain,
                    fanout_fanin,
                    chaos_monkey,
                },
            };
            // at this point f represents the Forwarder parameters
            for r in &f.run {
                match r {
                    settings::Field::daisy_chain => run_daisy_chain(&f),
                    settings::Field::fanout_fanin => run_fanout_fanin(&f),
                    settings::Field::chaos_monkey => run_chaos_monkey(&f),
                    _ => (),
                }
            }
        }
    }
}
pub fn run ( settings : & settings :: Settings ) { log :: info ! ( " " ) ; // let things settle down before diving in... std :: thread :: sleep ( std :: time :: Duration :: from_millis ( 750 ) ) ; // pull the forwarder info out of the additoanl hash map // for a in & settings . additional { if let Some ( v ) = a . get ( & settings :: Additional :: Forwarder ) { // v is a variant in AdditionalVariant, need to extract things info the Forwarder let f = match v . clone ( ) { settings :: AdditionalVariant :: Forwarder { run , default , daisy_chain , fanout_fanin , chaos_monkey , } => ForwarderSettings { run , default , daisy_chain , fanout_fanin , chaos_monkey , } , } ; // at this point f represents the Forwarder parameters for r in & f . run { match r { settings :: Field :: daisy_chain => run_daisy_chain ( & f ) , settings :: Field :: fanout_fanin => run_fanout_fanin ( & f ) , settings :: Field :: chaos_monkey => run_chaos_monkey ( & f ) , _ => ( ) , } } } } }
Take the setting from the variant and turn them into a concrete stuct that we can
pass around.
Take the setting from the variant and turn them into a concrete stuct that we can pass around .
settings
&settings::Settings