Documentation ¶
Index ¶
- type TopologyGraph
- func (t *TopologyGraph) AddEdge(source string, dest string)
- func (t *TopologyGraph) AddNode(node *graph.Node)
- func (t *TopologyGraph) CreateEdges()
- func (t *TopologyGraph) CreateNodes()
- func (t *TopologyGraph) GetUniqueId(name string) *UniqueId
- func (t *TopologyGraph) NewInstanceNode(instance *ec2.InstanceTopology) *graph.Node
- func (t *TopologyGraph) NewNetworkNode(name string, nodes []string, idx int) *graph.Node
- func (t *TopologyGraph) Reset()
- func (t *TopologyGraph) Topology(group string, instance string, saveFile string) error
- type UniqueId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TopologyGraph ¶
type TopologyGraph struct { // User preferences MatchPolicy string Region string // contains filtered or unexported fields }
func NewTopologyGraph ¶
func NewTopologyGraph(matchPolicy string, region string) *TopologyGraph
A NewTopologyGraph is associated with a region and match policy
func (*TopologyGraph) AddEdge ¶
func (t *TopologyGraph) AddEdge(source string, dest string)
AddEdge adds a bidirectional edge to the graph
func (*TopologyGraph) AddNode ¶
func (t *TopologyGraph) AddNode(node *graph.Node)
AddNode adds a node to the graph
func (*TopologyGraph) CreateEdges ¶
func (t *TopologyGraph) CreateEdges()
CreateEdges creates all edges at once
func (*TopologyGraph) CreateNodes ¶
func (t *TopologyGraph) CreateNodes()
CreateNodes creates all nodes at once
func (*TopologyGraph) GetUniqueId ¶
func (t *TopologyGraph) GetUniqueId(name string) *UniqueId
Get a unique id for a node (instance or network node) We need both int and string, so we return a struct
func (*TopologyGraph) NewInstanceNode ¶
func (t *TopologyGraph) NewInstanceNode(instance *ec2.InstanceTopology) *graph.Node
NewInstanceNode creates a new instance node for the graph
func (*TopologyGraph) NewNetworkNode ¶
NewNetworkNode creates a new network node We return a graph node, and a boolean to indicate created or not nodes should be the complete list of nodes, and idx the index of the network node in it
func (*TopologyGraph) Reset ¶
func (t *TopologyGraph) Reset()
Reset the topology graph to a "zero" count and no nodes seen or created
func (*TopologyGraph) Topology ¶
func (t *TopologyGraph) Topology(group string, instance string, saveFile string) error
This is to say that nn-ec17* is at the top, and the instance is connected directly to nn-a59. This means that two instances connected to that node are close together. The closer two instances are in the graph, overall, the closer. That is all of the information that we have!