mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
Make various anonymous fields named
Anonymous fields make any methods on the inner object visible on the outer, so they should only be used when the outer is-a inner.
This commit is contained in:
@@ -54,7 +54,7 @@ type kv interface {
|
||||
}
|
||||
|
||||
type consulClient struct {
|
||||
kv
|
||||
kv kv
|
||||
}
|
||||
|
||||
// Get and deserialise a JSON value from consul.
|
||||
|
||||
@@ -23,7 +23,7 @@ type Connection struct {
|
||||
RemoteAddress net.IP
|
||||
RemotePort uint16
|
||||
inode uint64
|
||||
Proc
|
||||
Proc Proc
|
||||
}
|
||||
|
||||
// Proc is a single process with PID and process name.
|
||||
|
||||
@@ -10,14 +10,14 @@ import (
|
||||
// EdgeMetadatas and Nodes respectively. Edges are directional, and embedded
|
||||
// in the Node struct.
|
||||
type Topology struct {
|
||||
Shape string `json:"shape,omitempty"`
|
||||
Label string `json:"label,omitempty"`
|
||||
LabelPlural string `json:"label_plural,omitempty"`
|
||||
Nodes `json:"nodes"`
|
||||
Controls `json:"controls,omitempty"`
|
||||
MetadataTemplates `json:"metadata_templates,omitempty"`
|
||||
MetricTemplates `json:"metric_templates,omitempty"`
|
||||
TableTemplates `json:"table_templates,omitempty"`
|
||||
Shape string `json:"shape,omitempty"`
|
||||
Label string `json:"label,omitempty"`
|
||||
LabelPlural string `json:"label_plural,omitempty"`
|
||||
Nodes Nodes `json:"nodes"`
|
||||
Controls Controls `json:"controls,omitempty"`
|
||||
MetadataTemplates MetadataTemplates `json:"metadata_templates,omitempty"`
|
||||
MetricTemplates MetricTemplates `json:"metric_templates,omitempty"`
|
||||
TableTemplates TableTemplates `json:"table_templates,omitempty"`
|
||||
}
|
||||
|
||||
// MakeTopology gives you a Topology.
|
||||
|
||||
Reference in New Issue
Block a user