pub async fn full(dot: bool, conf: &Config, reg: &Region) -> Result<CatGraph> {
    let mut graph: CatGraph = DiGraph::<_, _>::new();
    for svc in shipcat_filebacked::available(conf, reg).await? {
        debug!("Scanning service {:?}", svc);

        let mf = shipcat_filebacked::load_manifest(&svc.base.name, conf, reg).await?;
        let node = ManifestNode::new(&mf);
        let idx = graph.add_node(node);

        for dep in &mf.dependencies {
            let subidx = if let Some(id) = nodeidx_from_name(&dep.name, &graph) {
                trace!("Found dependency with existing node: {}", dep.name);
                id
            } else {
                trace!("Found dependency new in graph: {}", dep.name);
                let depmf = shipcat_filebacked::load_manifest(&dep.name, conf, reg).await?;
                let depnode = ManifestNode::new(&depmf);
                graph.add_node(depnode) // depidx
            };
            graph.update_edge(idx, subidx, DepEdge::new(&dep));
        }
    }

    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 services directory
///
/// This is a better solution even if we wanted the result centered around
/// one or more services as we could also show grahps reaching into the ecosystem.
///
/// But it would require: TODO: optionally filter edges around node(s)
Generate dependency graph from services directory
This is a better solution even if we wanted the result centered around
one or more services as we could also show grahps reaching into the ecosystem.

But it would require: TODO: optionally filter edges around node(s)
Generate dependency graph from services directory This is a better solution even if we wanted the result centered around one or more services as we could also show grahps reaching into the ecosystem . But it would require : TODO : optionally filter edges around node ( s )
pub async fn full(dot: bool, conf: &Config, reg: &Region) -> Result<CatGraph> {
    let mut graph: CatGraph = DiGraph::<_, _>::new();
    for svc in shipcat_filebacked::available(conf, reg).await? {
        debug!("Scanning service {:?}", svc);
        let mf = shipcat_filebacked::load_manifest(&svc.base.name, conf, reg).await?;
        let node = ManifestNode::new(&mf);
        let idx = graph.add_node(node);
        for dep in &mf.dependencies {
            let subidx = if let Some(id) = nodeidx_from_name(&dep.name, &graph) {
                trace!("Found dependency with existing node: {}", dep.name);
                id
            } else {
                trace!("Found dependency new in graph: {}", dep.name);
                let depmf = shipcat_filebacked::load_manifest(&dep.name, conf, reg).await?;
                let depnode = ManifestNode::new(&depmf);
                graph.add_node(depnode) // depidx
            };
            graph.update_edge(idx, subidx, DepEdge::new(&dep));
        }
    }
    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 full ( dot : bool , conf : & Config , reg : & Region ) -> Result < CatGraph > { let mut graph : CatGraph = DiGraph :: < _ , _ > :: new ( ) ; for svc in shipcat_filebacked :: available ( conf , reg ) . await ? { debug ! ( " " svc ) ; let mf = shipcat_filebacked :: load_manifest ( & svc . base . name , conf , reg ) . await ? ; let node = ManifestNode :: new ( & mf ) ; let idx = graph . add_node ( node ) ; for dep in & mf . dependencies { let subidx = if let Some ( id ) = nodeidx_from_name ( & dep . name , & graph ) { trace ! ( " " dep name ) ; id } else { trace ! ( " " dep name ) ; let depmf = shipcat_filebacked :: load_manifest ( & dep . name , conf , reg ) . await ? ; let depnode = ManifestNode :: new ( & depmf ) ; graph . add_node ( depnode ) // depidx } ; graph . update_edge ( idx , subidx , DepEdge :: new ( & dep ) ) ; } } 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 services directory
This is a better solution even if we wanted the result centered around
one or more services as we could also show grahps reaching into the ecosystem.
Generate dependency graph from services directory This is a better solution even if we wanted the result centered around one or more services as we could also show grahps reaching into the ecosystem .
dot
bool
conf
&Config
reg
&Region
dot
bool
conf
&Config
reg
&Region