pub async fn mass_template_verify(conf: &Config, reg: &Region, skipped: &[String]) -> Result<()> {
    let svcs = shipcat_filebacked::available(conf, reg).await?;

    let mut buffered = stream::iter(svcs)
        .map(move |mf| check_summary(mf.base.name, &skipped, &conf, &reg))
        .buffer_unordered(100);

    let (mut errs, mut passed): (Vec<Error>, Vec<_>) = (vec![], vec![]);
    while let Some(r) = buffered.next().await {
        match r {
            Ok(p) => passed.push(p),
            Err(e) => errs.push(e),
        }
    }

    for n in passed {
        info!("{} verified", n)
    }
    if !errs.is_empty() {
        for e in &errs {
            error!("{}", e);
            debug!("{:?}", e);
        }
        bail!("Failed to verify templates for {} manifest", errs.len());
    }
    Ok(())
}
/// Verifies all populated templates for all services in a region
///
/// Helper that shells out to helm template in parallel.
Verifies all populated templates for all services in a region
Helper that shells out to helm template in parallel.
Verifies all populated templates for all services in a region Helper that shells out to helm template in parallel .
pub async fn mass_template_verify(conf: &Config, reg: &Region, skipped: &[String]) -> Result<()> {
    let svcs = shipcat_filebacked::available(conf, reg).await?;
    let mut buffered = stream::iter(svcs)
        .map(move |mf| check_summary(mf.base.name, &skipped, &conf, &reg))
        .buffer_unordered(100);
    let (mut errs, mut passed): (Vec<Error>, Vec<_>) = (vec![], vec![]);
    while let Some(r) = buffered.next().await {
        match r {
            Ok(p) => passed.push(p),
            Err(e) => errs.push(e),
        }
    }
    for n in passed {
        info!("{} verified", n)
    }
    if !errs.is_empty() {
        for e in &errs {
            error!("{}", e);
            debug!("{:?}", e);
        }
        bail!("Failed to verify templates for {} manifest", errs.len());
    }
    Ok(())
}
pub async fn mass_template_verify ( conf : & Config , reg : & Region , skipped : & [ String ] ) -> Result < ( ) > { let svcs = shipcat_filebacked :: available ( conf , reg ) . await ? ; let mut buffered = stream :: iter ( svcs ) . map ( move | mf | check_summary ( mf . base . name , & skipped , & conf , & reg ) ) . buffer_unordered ( 100 ) ; let ( mut errs , mut passed ) : ( Vec < Error > , Vec < _ > ) = ( vec ! [ ] , vec ! [ ] ) ; while let Some ( r ) = buffered . next ( ) . await { match r { Ok ( p ) => passed . push ( p ) , Err ( e ) => errs . push ( e ) , } } for n in passed { info ! ( " " n ) } if ! errs . is_empty ( ) { for e in & errs { error ! ( " " e ) ; debug ! ( " " e ) ; } bail ! ( " " errs len ( ) ) ; } Ok ( ( ) ) }
Verifies all populated templates for all services in a region
Helper that shells out to helm template in parallel.
Verifies all populated templates for all services in a region Helper that shells out to helm template in parallel .
conf
&Config
reg
&Region
skipped
&[String]
conf
&Config
reg
&Region
skipped
&[String]