Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintNodesAtLevel ¶
PrintNodesAtLevel prints all nodes by given level in the tree
Types ¶
type Edge ¶
Edge holds source and destiny data of a node
func EdgesFromString ¶
EdgesFromString return an array of Edges taking as input an string in gographiz format
type FlowTree ¶
type FlowTree struct { ID string `json:"id"` Type string `json:"type"` SrcIP string `json:"src_ip"` DstIP string `json:"dst_ip"` SrcPort string `json:"src_port"` DstPort string `json:"dst_port"` Nodes string `json:"nodes"` NodesImg string `json:"nodes_img"` CapturedAt int64 `json:"captured_at"` Level int `json:"level"` Edges [][]Edge `json:"-"` IsSat bool `json:"is_sat"` }
FlowTree represents a data-path which a particular packet follows.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator holds the topology to be used by the generation process
func NewGenerator ¶
NewGenerator creates a new Generator object
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler topology struct
func NewHandler ¶
func NewHandler(repo packets.Repository, topoRepo topology.Repository, smtRepo smt.Repository) *Handler
NewHandler returns a new FlowTree Handler
type Node ¶
type Node struct { Name string Label string Parent *Node Children []*Node TimeOfIngress *time.Time TimeOfEgress *time.Time Level int // contains filtered or unexported fields }
Node a single node that composes the tree
type Tree ¶
Tree represents a rooted tree objected
func (*Tree) DFS ¶
DFS returns an array of parent and children nodes after traversing the tree using depth-first search algorithm
func (*Tree) FindNodeByLevel ¶
FindNodeByLevel finds a new at a given level of the tree