Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶
Edge represents an single edge in the graph and connects a source node to a target node.
type Graph ¶
type Graph struct { Sources []*Node Intermediates []*Node Targets []*Node Edges []*Edge // Attributes allow arbitrary information to be included with the Graph Attributes map[string]any }
Graph represents a horizontal directed flow graph that groups nodes by their position. Sources will appear on the left and should only be the source of edges, intermediates will appear it the middle and can be the target and source of edges, and targets will appear on the right and should only be the target of edges.
func (*Graph) AddIntermediate ¶
AddIntermediate adds an intermediate node (not a source or target) to the graph
type Node ¶
type Node struct { // ID is used to connect this Node to other Nodes via Edges ID string // Type is used to identify similar nodes and may impact rendering, e.g. "Processor" Type string // Label will be displayed on the Node in a rendering of the graph Label string // Attributes allow arbitrary information to be included with the Node Attributes map[string]any }
Node represents a single node in a graph and will be connected to other nodes by Edges.
type NodeAttributes ¶
NodeAttributes allow additional information, like the kind of the node and active telemetry types, to be associated with nodes.
func MakeAttributes ¶
func MakeAttributes(resourceKind, resourceID string) NodeAttributes
MakeAttributes adds the expected attributes to a map for a Node
func (NodeAttributes) AddAttribute ¶
func (n NodeAttributes) AddAttribute(key string, value any)
AddAttribute adds a key value pair to a NodeAttributes map.