Documentation ¶
Index ¶
Constants ¶
View Source
const ( // IncomingEdge is an edge inbound. IncomingEdge edgeDirection = iota // OutgoingEdge is an edge outbound. OutgoingEdge )
Variables ¶
This section is empty.
Functions ¶
func GetRecordsNamesForGraphables ¶
GetRecordsNamesForGraphables returns names in a graph.
Types ¶
type Dependency ¶
type Dependency struct { NameFQDN string Type DependencyType }
Dependency is a dependency.
func CreateDependencies ¶
func CreateDependencies(dependencyFQDNs []string, dependencyType DependencyType) []Dependency
CreateDependencies creates a dependency list from a list of FQDNs and a DepenendyType.
type DependencyType ¶
type DependencyType uint8
DependencyType enumerates the dependency types.
const ( // ForwardDependency is a forward dependency. ForwardDependency DependencyType = iota // BackwardDependency is a backwards dependency. BackwardDependency )
type Edge ¶ added in v4.7.3
type Edge[T Graphable] struct { Dependency Dependency Node *Node[T] Direction edgeDirection }
Edge an edge on the graph.
type Edges ¶ added in v4.7.3
Edges a list of edges.
func (Edges[T]) Contains ¶ added in v4.7.3
Contains returns true if a node is in the graph AND is in that direction.
func (Edges[T]) RemoveNode ¶ added in v4.7.3
RemoveNode removes a node from a graph.
type Graph ¶ added in v4.7.3
type Graph[T Graphable] struct { All dnsGraphNodes[T] Tree *dnstree.DomainTree[dnsGraphNodes[T]] }
Graph a graph.
func CreateGraph ¶
CreateGraph returns a graph.
func (*Graph[T]) AddEdge ¶ added in v4.7.3
func (graph *Graph[T]) AddEdge(sourceNode *Node[T], dependency Dependency)
AddEdge adds an edge to a graph.
func (*Graph[T]) AddNode ¶ added in v4.7.3
func (graph *Graph[T]) AddNode(data T)
AddNode adds a node to a graph.
func (*Graph[T]) RemoveNode ¶ added in v4.7.3
RemoveNode removes a node from a graph.
type Graphable ¶
type Graphable interface { GetType() NodeType GetName() string GetDependencies() []Dependency }
Graphable is an interface for things that can be in a graph.
Click to show internal directories.
Click to hide internal directories.