Edges

Edge is representing an edge between Nodes.

Basic

Edge is an object representing a connection between Nodes with some additional properties.

An edge object contains three attributes: label, color and style which mirror corresponding graphviz edge attributes.

ingress = Nginx("ingress")

metrics = Prometheus("metric")
metrics << Edge(color="firebrick", style="dashed") << Grafana("monitoring")

Bundle("Service Cluster"):
    grpcsvc = [
        Server("groupc1"),
        Server("groupc2"),
        Server("groupc3")]

Bundle("Sessions HA"):
    primary = Redis("session")
    primary \
        - Edge(color="brown", style="dashed") \
        - Redis("replica") \
        << Edge(label="collect") \
        << metrics
    grpcsvc >> Edge(color="brown") >> primary

Bundle("Database HA"):
    primary = PostgreSQL("users")
    primary \
        - Edge(color="brown", style="dotted") \
        - PostgreSQL("replica") \
        << Edge(label="collect") \
        << metrics
    grpcsvc >> Edge(color="black") >> primary

aggregator = Fluentd("logging")
aggregator \
    >> Edge(label="parse") \
    >> Kafka("stream") \
    >> Edge(color="black", style="bold") \
    >> Spark("analytics")

ingress \
    >> Edge(color="darkgreen") \
    << grpcsvc \
    >> Edge(color="darkorange") \
    >> aggregator

Diagram1

Colors & Styles

Default

Usericon("Alice") << Usericon("Bob")

Edge with label attribute

Usericon("Alice") << Edge(label="Sample Label") << Usericon("Bob")

Edge with dashed line

Usericon("Alice") << Edge(color="firebrick", style="dashed") << Usericon("Bob")

Edge with dotted line

Usericon("Alice") << Edge(color="firebrick", style="dotted") << Usericon("Bob")

Edge with bold line

Usericon("Alice") << Edge(color="firebrick", style="bold") << Usericon("Bob")