Documentation ¶
Overview ¶
Package graphviz provides some simple types for building graphviz DOT files based on their usage for container debugging. It does not attempt to cover all of graphviz, just what is needed here.
Package graphviz
Index ¶
- type Attributes
- func (a *Attributes) SetAttr(name, value string)
- func (a *Attributes) SetBgColor(color string)
- func (a *Attributes) SetColor(color string)
- func (a *Attributes) SetComment(comment string)
- func (a *Attributes) SetFontColor(color string)
- func (a *Attributes) SetFontSize(size string)
- func (a *Attributes) SetLabel(label string)
- func (a *Attributes) SetPenWidth(w string)
- func (a *Attributes) SetShape(shape string)
- func (a *Attributes) SetStyle(style string)
- func (a *Attributes) String() string
- type Edge
- type Graph
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attributes ¶
type Attributes struct {
// contains filtered or unexported fields
}
Attributes represents a graphviz attributes map.
func NewAttributes ¶
func NewAttributes() *Attributes
NewAttributes creates a new Attributes instance.
func (*Attributes) SetAttr ¶
func (a *Attributes) SetAttr(name, value string)
SetAttr sets the graphviz attribute to the provided value.
func (*Attributes) SetBgColor ¶
func (a *Attributes) SetBgColor(color string)
SetBgColor sets the bgcolor attribute.
func (*Attributes) SetColor ¶
func (a *Attributes) SetColor(color string)
SetColor sets the color attribute.
func (*Attributes) SetComment ¶
func (a *Attributes) SetComment(comment string)
SetComment sets the comment attribute.
func (*Attributes) SetFontColor ¶
func (a *Attributes) SetFontColor(color string)
SetFontColor sets the fontcolor attribute.
func (*Attributes) SetFontSize ¶
func (a *Attributes) SetFontSize(size string)
SetFontSize sets the fontsize attribute.
func (*Attributes) SetLabel ¶
func (a *Attributes) SetLabel(label string)
SetLabel sets the label attribute.
func (*Attributes) SetPenWidth ¶
func (a *Attributes) SetPenWidth(w string)
SetPenWidth sets the penwidth attribute.
func (*Attributes) SetShape ¶
func (a *Attributes) SetShape(shape string)
SetShape sets the shape attribute.
func (*Attributes) SetStyle ¶
func (a *Attributes) SetStyle(style string)
SetStyle sets the style attribute.
func (*Attributes) String ¶
func (a *Attributes) String() string
String returns the attributes graphviz string in the format [name = "value", ...].
type Edge ¶
type Edge struct { *Attributes // contains filtered or unexported fields }
Edge represents a graphviz edge.
type Graph ¶
type Graph struct { *Attributes // contains filtered or unexported fields }
Graph represents a graphviz digraph.
func (*Graph) CreateEdge ¶
CreateEdge creates a new graphviz edge.
func (*Graph) FindOrCreateNode ¶
FindOrCreateNode finds or creates the node with the provided name.
func (*Graph) FindOrCreateSubGraph ¶
FindOrCreateSubGraph finds or creates the subgraph with the provided name.
func (*Graph) RenderDOT ¶
RenderDOT renders the graph to DOT format.
type Node ¶
type Node struct { *Attributes // contains filtered or unexported fields }
Node represents a graphviz node.