graphviz

package
v0.40.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GraphViz

func GraphViz(w io.Writer, graphs []Graph) error

func Viz

func Viz(w io.Writer, edges map[string]map[string]Edge, vs ...Entity) error

Viz 将v画图png输出到w edges是从`from entity name`到`to entity name`的边

Types

type Edge

type Edge struct {
	Name     string
	TailPort string
	HeadPort string
}

func MakeEdge

func MakeEdge(from, to Entity, tail, head string) Edge

type Entity

type Entity interface {
	Name() string
	Label() string
	Ports() []string
}

func ToEntity

func ToEntity(v any) Entity

func ToEntityBatch added in v0.23.0

func ToEntityBatch(vs ...any) []Entity

type Graph

type Graph struct {
	Name    string
	Edges   map[string]map[string]Edge
	Entitys []Entity
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL