Documentation ¶
Index ¶
- type Link
- type LinkType
- type Node
- type NodeType
- type Route
- type Run
- type Topology
- func (t *Topology) AddLink(link *Link)
- func (t *Topology) AddNode(node *Node)
- func (t *Topology) AddRun(run *Run)
- func (t *Topology) GetNode(name string) *Node
- func (t *Topology) RemoveTopologyFile()
- func (t *Topology) SaveTopologyFile()
- func (t *Topology) String() string
- func (t *Topology) YAML() []byte
- type YAMLLink
- type YAMLLinkType
- type YAMLNode
- type YAMLNodeType
- type YAMLRoute
- type YAMLRun
- type YAMLTopology
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Topology ¶
Topology is a network topology
func GetTopology ¶
GetTopology returns the topology identified by name
func NewTopologyYAML ¶
NewTopologyYAML parses and returns the yaml topology in b
func NewTopologyYAMLFile ¶
NewTopologyYAMLFile returns a new topology parsed from yaml file
func ParseYAMLTopology ¶
ParseYAMLTopology parses and returns the yaml topology in b
func (*Topology) RemoveTopologyFile ¶
func (t *Topology) RemoveTopologyFile()
RemoveTopologyFile removes the topology from the topologies directory
func (*Topology) SaveTopologyFile ¶
func (t *Topology) SaveTopologyFile()
SaveTopologyFile saves the topology in the topologies directory
type YAMLLink ¶
type YAMLLink struct { Name string Type YAMLLinkType Nodes [2]string MACs [2]string IPs [2]string }
YAMLLink is a yaml representation of a link
type YAMLNode ¶
type YAMLNode struct { Name string Type YAMLNodeType Routes []*Route Run []string }
YAMLNode is a yaml representation of a node
type YAMLTopology ¶
YAMLTopology is a yaml representation of a topology
func NewYAMLTopology ¶
func NewYAMLTopology(t *Topology) *YAMLTopology
NewYAMLTopology returns a new YAMLTopology
Click to show internal directories.
Click to hide internal directories.