Documentation
¶
Index ¶
- Constants
- Variables
- func BuildConfigFiles(cfg *types.Config, nm *types.NetworkModel, verbose bool) error
- func BuildNetworkModel(cfg *types.Config, d *Diagram, verbose bool) (nm *types.NetworkModel, err error)
- func LoadModules(cfg *types.Config) error
- func ParseLabels(value string) (classes []string)
- type ConfigBlock
- type ConfigElement
- type ConfigElementer
- type ConfigGroup
- type ConfigGrouper
- type Diagram
- func (d *Diagram) Groups() map[string]*gographviz.SubGraph
- func (d *Diagram) Links() []*gographviz.Edge
- func (d *Diagram) MergeDiagram(d2 *Diagram)
- func (d *Diagram) NodeGroups(name string) (groups []*gographviz.SubGraph)
- func (d *Diagram) Nodes() []*gographviz.Node
- func (d *Diagram) SortedLinks() []*gographviz.Edge
- func (d *Diagram) SortedNodes() []*gographviz.Node
- type SorterConfigBlocks
Constants ¶
View Source
const CONFIG_SEPARATOR = "%"
View Source
const ChildGroupsConfigHeader string = "groups" + NumberSeparator
View Source
const ChildInterfacesConfigHeader string = "interfaces" + NumberSeparator
View Source
const ChildMembersConfigHeader string = "members" + NumberSeparator
View Source
const ChildNeighborsConfigHeader string = "neighbors" + NumberSeparator
View Source
const ChildNodesConfigHeader string = "nodes" + NumberSeparator
View Source
const EmptyOutput string = "#EMPTY#"
View Source
const EmptySeparator string = "#NONE#"
View Source
const ManagementInterfaceName string = "mgmt"
View Source
const ManagementLayerReplacer string = "mgmt"
View Source
const NChars int = 32
View Source
const NumberAS string = "as"
View Source
const NumberNumber string = "number"
View Source
const NumberPrefixGroup string = "group" + NumberSeparator
View Source
const NumberPrefixMember string = "m" + NumberSeparator
View Source
const NumberPrefixNeighbor string = "n" + NumberSeparator
View Source
const NumberPrefixNode string = "node" + NumberSeparator
View Source
const NumberPrefixOppositeHeader string = "opp" + NumberSeparator
View Source
const NumberPrefixOppositeInterface string = "opp" + NumberSeparator
View Source
const NumberReplacerName string = "name"
View Source
const NumberSeparator string = "_"
View Source
const SelfConfigHeader string = "self" + NumberSeparator
Variables ¶
View Source
var SEPARATOR *regexp.Regexp
Functions ¶
func BuildConfigFiles ¶
func BuildNetworkModel ¶
func LoadModules ¶
func ParseLabels ¶
Types ¶
type ConfigBlock ¶
type ConfigElement ¶
type ConfigElement struct {
Line string
}
func (*ConfigElement) String ¶
func (e *ConfigElement) String() string
func (*ConfigElement) StringLines ¶
func (e *ConfigElement) StringLines() []string
type ConfigElementer ¶
type ConfigGroup ¶
func (*ConfigGroup) Add ¶
func (g *ConfigGroup) Add(line string)
func (*ConfigGroup) AddElement ¶
func (g *ConfigGroup) AddElement(e ConfigElementer)
func (*ConfigGroup) Get ¶
func (g *ConfigGroup) Get(title string) (ConfigGrouper, bool)
func (*ConfigGroup) String ¶
func (g *ConfigGroup) String() string
func (*ConfigGroup) StringLines ¶
func (g *ConfigGroup) StringLines() []string
type ConfigGrouper ¶
type ConfigGrouper interface {
Add(string)
AddElement(ConfigElementer)
Get(string) (ConfigGrouper, bool)
String() string
StringLines() []string
}
type Diagram ¶
type Diagram struct {
// contains filtered or unexported fields
}
func DiagramFromDotFile ¶
func (*Diagram) Links ¶
func (d *Diagram) Links() []*gographviz.Edge
func (*Diagram) MergeDiagram ¶
Merge Diagram merge components in two Diagram objects. Labels in same components are merged. Lines are considered same only when the end nodes and "their ports" are completely same (Note that links without specified ports are always considered different).
func (*Diagram) NodeGroups ¶
func (d *Diagram) NodeGroups(name string) (groups []*gographviz.SubGraph)
func (*Diagram) Nodes ¶
func (d *Diagram) Nodes() []*gographviz.Node
func (*Diagram) SortedLinks ¶
func (d *Diagram) SortedLinks() []*gographviz.Edge
func (*Diagram) SortedNodes ¶
func (d *Diagram) SortedNodes() []*gographviz.Node
type SorterConfigBlocks ¶
type SorterConfigBlocks struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.