Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlInstance ¶
type ControlInstance struct {
ProbeID string `json:"probeId"`
NodeID string `json:"nodeId"`
report.Control
}
ControlInstance contains a control description, and all the info needed to execute it.
type MetadataRow ¶
type MetadataRow struct {
ID string `json:"id"`
Label string `json:"label"`
Value string `json:"value"`
}
MetadataRow is a row for the metadata table.
func NodeMetadata ¶
func NodeMetadata(n report.Node) []MetadataRow
NodeMetadata produces a table (to be consumed directly by the UI) based on an origin ID, which is (optimistically) a node ID in one of our topologies.
func (MetadataRow) Copy ¶
func (m MetadataRow) Copy() MetadataRow
Copy returns a value copy of a metadata row.
type MetricRow ¶
type MetricRow struct {
ID string
Label string
Format string
Group string
Value float64
Metric *report.Metric
}
MetricRow is a tuple of data used to render a metric as a sparkline and accoutrements.
func NodeMetrics ¶
NodeMetrics produces a table (to be consumed directly by the UI) based on an origin ID, which is (optimistically) a node ID in one of our topologies.
func (MetricRow) Copy ¶
Copy returns a value copy of the MetricRow
type Node ¶
type Node struct {
NodeSummary
Rank string `json:"rank,omitempty"`
Pseudo bool `json:"pseudo,omitempty"`
Controls []ControlInstance `json:"controls"`
Children []NodeSummaryGroup `json:"children,omitempty"`
Parents []Parent `json:"parents,omitempty"`
}
Node is the data type that's yielded to the JavaScript layer when we want deep information about an individual node.
type NodeSummary ¶
type NodeSummary struct {
ID string `json:"id"`
Label string `json:"label"`
Linkable bool `json:"linkable"` // Whether this node can be linked-to
Metadata []MetadataRow `json:"metadata,omitempty"`
Metrics []MetricRow `json:"metrics,omitempty"`
}
NodeSummary is summary information about a child for a Node.
func MakeNodeSummary ¶
func MakeNodeSummary(n report.Node) (NodeSummary, bool)
MakeNodeSummary summarizes a node, if possible.
func (NodeSummary) Copy ¶
func (n NodeSummary) Copy() NodeSummary
Copy returns a value copy of the NodeSummary
type NodeSummaryGroup ¶
type NodeSummaryGroup struct {
Label string `json:"label"`
Nodes []NodeSummary `json:"nodes"`
TopologyID string `json:"topologyId"`
Columns []string `json:"columns"`
}
NodeSummaryGroup is a topology-typed group of children for a Node.
func (NodeSummaryGroup) Copy ¶
func (g NodeSummaryGroup) Copy() NodeSummaryGroup
Copy returns a value copy of the NodeSummaryGroup
Source Files
¶
- metadata.go
- metrics.go
- node.go
- summary.go