pub async fn reverse(service: &str, conf: &Config, reg: &Region) -> Result<Vec<String>> {
    let mut res = vec![];
    for svc in shipcat_filebacked::available(conf, reg).await? {
        let mf = shipcat_filebacked::load_manifest(&svc.base.name, conf, reg).await?;
        if mf.dependencies.into_iter().any(|d| d.name == service) {
            res.push(svc.base.name)
        }
    }
    let out = serde_yaml::to_string(&res)?;
    println!("{}", out);
    Ok(res)
}
/// Generate first level reverse dependencies for a service
Generate first level reverse dependencies for a service
Generate first level reverse dependencies for a service
pub async fn reverse(service: &str, conf: &Config, reg: &Region) -> Result<Vec<String>> {
    let mut res = vec![];
    for svc in shipcat_filebacked::available(conf, reg).await? {
        let mf = shipcat_filebacked::load_manifest(&svc.base.name, conf, reg).await?;
        if mf.dependencies.into_iter().any(|d| d.name == service) {
            res.push(svc.base.name)
        }
    }
    let out = serde_yaml::to_string(&res)?;
    println!("{}", out);
    Ok(res)
}
pub async fn reverse ( service : & str , conf : & Config , reg : & Region ) -> Result < Vec < String > > { let mut res = vec ! [ ] ; for svc in shipcat_filebacked :: available ( conf , reg ) . await ? { let mf = shipcat_filebacked :: load_manifest ( & svc . base . name , conf , reg ) . await ? ; if mf . dependencies . into_iter ( ) . any ( | d | d . name == service ) { res . push ( svc . base . name ) } } let out = serde_yaml :: to_string ( & res ) ? ; println ! ( " " out ) ; Ok ( res ) }
Generate first level reverse dependencies for a service
Generate first level reverse dependencies for a service
service
&str
conf
&Config
reg
&Region
service
&str
conf
&Config
reg
&Region