refactor: remove support for non-linkable connections

Connections have always been linkable, so this is dead code.
This commit is contained in:
Matthias Radestock
2018-01-02 10:17:36 +00:00
parent 9754bf2385
commit dd41956d60
2 changed files with 6 additions and 13 deletions

View File

@@ -48,7 +48,6 @@ type Connection struct {
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"`
Linkable bool `json:"linkable"`
Metadata []report.MetadataRow `json:"metadata,omitempty"`
}
@@ -132,7 +131,6 @@ func (c *connectionCounters) rows(r report.Report, ns report.Nodes, includeLocal
NodeID: summary.ID,
Label: summary.Label,
LabelMinor: summary.LabelMinor,
Linkable: true,
}
if row.remoteAddr != "" {
connection.Label = row.remoteAddr

View File

@@ -154,7 +154,6 @@ func TestMakeDetailedHostNode(t *testing.T) {
NodeID: fixture.ServerHostNodeID,
Label: "server",
LabelMinor: "hostname.com",
Linkable: true,
Metadata: []report.MetadataRow{
{
ID: "port",
@@ -261,7 +260,6 @@ func TestMakeDetailedContainerNode(t *testing.T) {
NodeID: fixture.ClientContainerNodeID,
Label: "client",
LabelMinor: "client.hostname.com",
Linkable: true,
Metadata: []report.MetadataRow{
{
ID: "port",
@@ -274,10 +272,9 @@ func TestMakeDetailedContainerNode(t *testing.T) {
},
},
{
ID: connectionID(render.IncomingInternetID, fixture.RandomClientIP),
NodeID: render.IncomingInternetID,
Label: fixture.RandomClientIP,
Linkable: true,
ID: connectionID(render.IncomingInternetID, fixture.RandomClientIP),
NodeID: render.IncomingInternetID,
Label: fixture.RandomClientIP,
Metadata: []report.MetadataRow{
{
ID: "port",
@@ -378,7 +375,6 @@ func TestMakeDetailedPodNode(t *testing.T) {
NodeID: fixture.ClientPodNodeID,
Label: "pong-a",
LabelMinor: "1 container",
Linkable: true,
Metadata: []report.MetadataRow{
{
ID: "port",
@@ -391,10 +387,9 @@ func TestMakeDetailedPodNode(t *testing.T) {
},
},
{
ID: connectionID(render.IncomingInternetID, fixture.RandomClientIP),
NodeID: render.IncomingInternetID,
Label: fixture.RandomClientIP,
Linkable: true,
ID: connectionID(render.IncomingInternetID, fixture.RandomClientIP),
NodeID: render.IncomingInternetID,
Label: fixture.RandomClientIP,
Metadata: []report.MetadataRow{
{
ID: "port",