detailed

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

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

func NodeMetrics(n report.Node) []MetricRow

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

func (m MetricRow) Copy() MetricRow

Copy returns a value copy of the MetricRow

func (MetricRow) MarshalJSON

func (m MetricRow) MarshalJSON() ([]byte, error)

MarshalJSON marshals this MetricRow to json. It takes the basic Metric rendering, then adds some row-specific fields.

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.

func MakeNode

func MakeNode(r report.Report, n render.RenderableNode) Node

MakeNode transforms a renderable node to a detailed node. It uses aggregate metadata, plus the set of origin node IDs, to produce tables.

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL