Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Column ¶ added in v0.13.0
type Column string
Column provides special json serialization for column ids, so they include their label for the frontend.
func (*Column) CodecDecodeSelf ¶ added in v0.13.0
CodecDecodeSelf implements codec.Selfer
func (*Column) CodecEncodeSelf ¶ added in v0.13.0
CodecEncodeSelf implements codec.Selfer
func (Column) MarshalJSON ¶ added in v0.13.0
MarshalJSON shouldn't be used, use CodecEncodeSelf instead
func (*Column) UnmarshalJSON ¶ added in v0.13.0
UnmarshalJSON shouldn't be used, use CodecDecodeSelf instead
type ControlInstance ¶
ControlInstance contains a control description, and all the info needed to execute it.
func (*ControlInstance) CodecDecodeSelf ¶ added in v0.13.0
func (c *ControlInstance) CodecDecodeSelf(decoder *codec.Decoder)
CodecDecodeSelf implements codec.Selfer
func (*ControlInstance) CodecEncodeSelf ¶ added in v0.13.0
func (c *ControlInstance) CodecEncodeSelf(encoder *codec.Encoder)
CodecEncodeSelf marshals this MetricRow. It takes the basic Metric rendering, then adds some row-specific fields.
func (ControlInstance) MarshalJSON ¶ added in v0.13.0
func (ControlInstance) MarshalJSON() ([]byte, error)
MarshalJSON shouldn't be used, use CodecEncodeSelf instead
func (*ControlInstance) UnmarshalJSON ¶ added in v0.13.0
func (*ControlInstance) UnmarshalJSON(b []byte) error
UnmarshalJSON shouldn't be used, use CodecDecodeSelf instead
type Counter ¶ added in v0.13.0
Counter extracts some metadata rows from a node's Counters
func (Counter) MetadataRows ¶ added in v0.13.0
func (c Counter) MetadataRows(n report.Node) []MetadataRow
MetadataRows implements MetadataRowTemplate
type Latest ¶ added in v0.13.0
type Latest struct { ID string Truncate int // If > 0, truncate the value to this length. Prime bool // Whether the row should be shown by default }
Latest extracts some metadata rows from a node's Latest
func (Latest) MetadataRows ¶ added in v0.13.0
func (l Latest) MetadataRows(n report.Node) []MetadataRow
MetadataRows implements MetadataRowTemplate
type MetadataRow ¶
MetadataRow is a row for the metadata table.
func NodeDockerLabels ¶ added in v0.13.0
func NodeDockerLabels(nmd report.Node) []MetadataRow
NodeDockerLabels 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 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) CodecDecodeSelf ¶ added in v0.13.0
func (m *MetadataRow) CodecDecodeSelf(decoder *codec.Decoder)
CodecDecodeSelf implements codec.Selfer
func (*MetadataRow) CodecEncodeSelf ¶ added in v0.13.0
func (m *MetadataRow) CodecEncodeSelf(encoder *codec.Encoder)
CodecEncodeSelf marshals this MetadataRow. It adds a label before rendering.
func (MetadataRow) Copy ¶
func (m MetadataRow) Copy() MetadataRow
Copy returns a value copy of a metadata row.
func (MetadataRow) MarshalJSON ¶ added in v0.13.0
func (MetadataRow) MarshalJSON() ([]byte, error)
MarshalJSON shouldn't be used, use CodecEncodeSelf instead
func (*MetadataRow) UnmarshalJSON ¶ added in v0.13.0
func (*MetadataRow) UnmarshalJSON(b []byte) error
UnmarshalJSON shouldn't be used, use CodecDecodeSelf instead
type MetadataRowTemplate ¶ added in v0.13.0
type MetadataRowTemplate interface {
MetadataRows(report.Node) []MetadataRow
}
MetadataRowTemplate extracts some metadata rows from a node
type MetricRow ¶
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) CodecDecodeSelf ¶ added in v0.13.0
CodecDecodeSelf implements codec.Selfer
func (*MetricRow) CodecEncodeSelf ¶ added in v0.13.0
CodecEncodeSelf marshals this MetricRow. It takes the basic Metric rendering, then adds some row-specific fields.
func (MetricRow) MarshalJSON ¶
MarshalJSON shouldn't be used, use CodecEncodeSelf instead
func (*MetricRow) UnmarshalJSON ¶ added in v0.13.0
UnmarshalJSON shouldn't be used, use CodecDecodeSelf instead
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"` DockerLabels []MetadataRow `json:"docker_labels,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 []Column `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
type Parent ¶
type Parent struct { ID string `json:"id"` Label string `json:"label"` TopologyID string `json:"topologyId"` }
Parent is the information needed to build a link to the parent of a Node.
type Set ¶ added in v0.13.0
type Set struct {
ID string
}
Set extracts some metadata rows from a node's Sets
func (Set) MetadataRows ¶ added in v0.13.0
func (s Set) MetadataRows(n report.Node) []MetadataRow
MetadataRows implements MetadataRowTemplate