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 ¶
type Edge[T Graphable] struct { Dependency Dependency Node *Node[T] Direction edgeDirection }
Edge an edge on the graph.
type Edges ¶
Edges a list of edges.
func (Edges[T]) Contains ¶
Contains returns true if a node is in the graph AND is in that direction.
func (Edges[T]) RemoveNode ¶
RemoveNode removes a node from a graph.
type Graph ¶
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 ¶
func (graph *Graph[T]) AddEdge(sourceNode *Node[T], dependency Dependency)
AddEdge adds an edge to a graph.
func (*Graph[T]) RemoveNode ¶
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.