pub async fn generate(service: &str, conf: &Config, reg: &Region, dot: bool) -> Result<CatGraph> {
    let base = shipcat_filebacked::load_manifest(service, conf, reg).await?;

    let mut graph: CatGraph = DiGraph::<_, _>::new();
    let node = ManifestNode::new(&base);
    let baseidx = graph.add_node(node);

    recurse_manifest(baseidx, &base, conf, reg, &mut graph)?;

    let out = if dot {
        format!("{:?}", dot::Dot::with_config(&graph, &[dot::Config::EdgeNoLabel]))
    } else {
        serde_yaml::to_string(&graph)?
    };
    println!("{}", out);
    Ok(graph)
}
/// Generate dependency graph from an entry point via recursion
Generate dependency graph from an entry point via recursion
Generate dependency graph from an entry point via recursion
pub async fn generate(service: &str, conf: &Config, reg: &Region, dot: bool) -> Result<CatGraph> {
    let base = shipcat_filebacked::load_manifest(service, conf, reg).await?;
    let mut graph: CatGraph = DiGraph::<_, _>::new();
    let node = ManifestNode::new(&base);
    let baseidx = graph.add_node(node);
    recurse_manifest(baseidx, &base, conf, reg, &mut graph)?;
    let out = if dot {
        format!("{:?}", dot::Dot::with_config(&graph, &[dot::Config::EdgeNoLabel]))
    } else {
        serde_yaml::to_string(&graph)?
    };
    println!("{}", out);
    Ok(graph)
}
pub async fn generate ( service : & str , conf : & Config , reg : & Region , dot : bool ) -> Result < CatGraph > { let base = shipcat_filebacked :: load_manifest ( service , conf , reg ) . await ? ; let mut graph : CatGraph = DiGraph :: < _ , _ > :: new ( ) ; let node = ManifestNode :: new ( & base ) ; let baseidx = graph . add_node ( node ) ; recurse_manifest ( baseidx , & base , conf , reg , & mut graph ) ? ; let out = if dot { format ! ( " " dot Dot with_config ( graph [ dot Config EdgeNoLabel ] ) ) } else { serde_yaml :: to_string ( & graph ) ? } ; println ! ( " " out ) ; Ok ( graph ) }
Generate dependency graph from an entry point via recursion
Generate dependency graph from an entry point via recursion
service
&str
conf
&Config
reg
&Region
dot
bool
service
&str
conf
&Config
reg
&Region
dot
bool