Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
const ( ImageNameNone = "<none>" // Keys we use to render container names AmazonECSContainerNameLabel = "com.amazonaws.ecs.container-name" KubernetesContainerNameLabel = "io.kubernetes.container.name" MarathonAppIDEnv = "MARATHON_APP_ID" )
Shapes that are allowed
Variables ¶
var ( NormalColumns = []Column{ {ID: portKey, Label: portLabel, Datatype: report.Number}, {ID: countKey, Label: countLabel, Datatype: report.Number, DefaultSort: true}, } InternetColumns = []Column{ {ID: remoteKey, Label: remoteLabel}, {ID: portKey, Label: portLabel, Datatype: report.Number}, {ID: countKey, Label: countLabel, Datatype: report.Number, DefaultSort: true}, } )
Exported for testing
Functions ¶
This section is empty.
Types ¶
type BasicNodeSummary ¶ added in v1.7.1
type BasicNodeSummary struct {
	ID         string `json:"id"`
	Label      string `json:"label"`
	LabelMinor string `json:"labelMinor"`
	Rank       string `json:"rank"`
	Shape      string `json:"shape,omitempty"`
	Tag        string `json:"tag,omitempty"`
	Stack      bool   `json:"stack,omitempty"`
	Pseudo     bool   `json:"pseudo,omitempty"`
}
    BasicNodeSummary is basic summary information about a Node, sufficient for rendering links to the node.
type Column ¶ added in v0.13.0
type Column struct {
	ID          string `json:"id"`
	Label       string `json:"label"`
	DefaultSort bool   `json:"defaultSort"`
	Datatype    string `json:"dataType"`
}
    Column provides special json serialization for column ids, so they include their label for the frontend.
type Connection ¶ added in v0.14.0
type Connection struct {
	ID         string               `json:"id"`     // ID of this element in the UI.  Must be unique for a given ConnectionsSummary.
	NodeID     string               `json:"nodeId"` // ID of a node in the topology. Optional, must be set if linkable is true.
	Label      string               `json:"label"`
	LabelMinor string               `json:"labelMinor,omitempty"`
	Metadata   []report.MetadataRow `json:"metadata,omitempty"`
}
    Connection is a row in the connections table.
type ConnectionsSummary ¶ added in v0.14.0
type ConnectionsSummary struct {
	ID          string       `json:"id"`
	TopologyID  string       `json:"topologyId"`
	Label       string       `json:"label"`
	Columns     []Column     `json:"columns"`
	Connections []Connection `json:"connections"`
}
    ConnectionsSummary is the table of connection to/form a node
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 ControlInstance. 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 Diff ¶ added in v0.14.0
type Diff struct {
	Add    []NodeSummary `json:"add"`
	Update []NodeSummary `json:"update"`
	Remove []string      `json:"remove"`
	Reset  bool          `json:"reset,omitempty"`
}
    Diff is returned by TopoDiff. It represents the changes between two NodeSummary maps.
func TopoDiff ¶ added in v0.14.0
func TopoDiff(a, b NodeSummaries) Diff
TopoDiff gives you the diff to get from A to B.
type Node ¶
type Node struct {
	NodeSummary
	Controls    []ControlInstance    `json:"controls"`
	Children    []NodeSummaryGroup   `json:"children,omitempty"`
	Connections []ConnectionsSummary `json:"connections,omitempty"`
}
    Node is the data type that's yielded to the JavaScript layer when we want deep information about an individual node.
type NodeSummaries ¶ added in v0.14.0
type NodeSummaries map[string]NodeSummary
NodeSummaries is a set of NodeSummaries indexed by ID.
func Summaries ¶ added in v0.14.0
func Summaries(ctx context.Context, rc RenderContext, rns report.Nodes) NodeSummaries
Summaries converts RenderableNodes into a set of NodeSummaries
type NodeSummary ¶
type NodeSummary struct {
	BasicNodeSummary
	Metadata  []report.MetadataRow `json:"metadata,omitempty"`
	Parents   []Parent             `json:"parents,omitempty"`
	Metrics   []report.MetricRow   `json:"metrics,omitempty"`
	Tables    []report.Table       `json:"tables,omitempty"`
	Adjacency report.IDList        `json:"adjacency,omitempty"`
}
    NodeSummary is summary information about a Node.
func MakeNodeSummary ¶
func MakeNodeSummary(rc RenderContext, n report.Node) (NodeSummary, bool)
MakeNodeSummary summarizes a node, if possible.
func RenderMetricURLs ¶ added in v1.6.3
func RenderMetricURLs(summary NodeSummary, n report.Node, r report.Report, metricsGraphURL string) NodeSummary
RenderMetricURLs sets respective URLs for metrics in a node summary. Missing metrics where we have a query for will be appended as an empty metric (no values or samples).
func (NodeSummary) SummarizeMetrics ¶ added in v0.14.0
func (n NodeSummary) SummarizeMetrics() NodeSummary
SummarizeMetrics returns a copy of the NodeSummary where the metrics are replaced with their summaries
type NodeSummaryGroup ¶
type NodeSummaryGroup struct {
	ID         string        `json:"id"`
	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.
      
      Source Files
      ¶
    
- connections.go
 - links.go
 - node.go
 - parents.go
 - summary.go
 - topology_diff.go