Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLeafsTargets ¶ added in v0.7.0
func GetLeafsTargets(node *DNSTreeNode, targets *[]string) *[]string
GetLeafsTargets returns IP or CNAME of the leafs of a tree. alternatively, it can populate the passed in array with pointers to targets
func RandomizeDuration ¶
RandomizeDuration randomizes duration for a given variance. variance is expected to be of a format 0.1 for 10%, 0.5 for 50% and so on
func ToEndpoints ¶ added in v0.7.0
func ToEndpoints(node *DNSTreeNode, endpoints *[]*endpoint.Endpoint) *[]*endpoint.Endpoint
ToEndpoints transforms a tree into an array of endpoints. The array could be returned or passed in to be populated
Types ¶
type DNSTreeNode ¶ added in v0.7.0
type DNSTreeNode struct { Name string Children []*DNSTreeNode DataSets []DNSTreeNodeData }
DNSTreeNode stores a relation between endpoints that were parsed into a tree
func MakeTreeFromDNSRecord ¶ added in v0.7.0
func MakeTreeFromDNSRecord(record *v1alpha1.DNSRecord) *DNSTreeNode
func (*DNSTreeNode) RemoveNode ¶ added in v0.7.0
func (n *DNSTreeNode) RemoveNode(deleteNode *DNSTreeNode)
RemoveNode removes a node from a tree. If the node was the only child of the parent node, the parent will be removed as well unless the parent is a root node
Click to show internal directories.
Click to hide internal directories.