Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
fixup! Include selected overlay type in connection status
Browse files Browse the repository at this point in the history
  • Loading branch information
awh committed Oct 13, 2015
1 parent 548446d commit 15beaa7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion router/fastdp.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ func (fwd *fastDatapathForwarder) ControlMessage(tag byte, msg []byte) {
}
}

func (fwd *fastDatapathForwarder) OverlayType() string {
func (fwd *fastDatapathForwarder) DisplayName() string {
return "fastdp"
}

Expand Down
6 changes: 3 additions & 3 deletions router/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ type OverlayForwarder interface {
// ProtocolOverlayControlMessage for non-sleeve overlays.
ControlMessage(tag byte, msg []byte)

// Type of overlay this forwarder belongs to
OverlayType() string
// User facing overlay name
DisplayName() string
}

type NullOverlay struct{}
Expand Down Expand Up @@ -136,7 +136,7 @@ func (NullOverlay) Stop() {
func (NullOverlay) ControlMessage(byte, []byte) {
}

func (NullOverlay) OverlayType() string {
func (NullOverlay) DisplayName() string {
return "null"
}

Expand Down
4 changes: 2 additions & 2 deletions router/overlay_switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func (fwd *overlaySwitchForwarder) ControlMessage(tag byte, msg []byte) {
}
}

func (fwd *overlaySwitchForwarder) OverlayType() string {
func (fwd *overlaySwitchForwarder) DisplayName() string {
fwd.lock.Lock()
best := fwd.best
fwd.lock.Unlock()
Expand All @@ -411,5 +411,5 @@ func (fwd *overlaySwitchForwarder) OverlayType() string {
return "none"
}

return best.OverlayType()
return best.DisplayName()
}
2 changes: 1 addition & 1 deletion router/sleeve.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ func (fwd *sleeveForwarder) ControlMessage(tag byte, msg []byte) {
}
}

func (fwd *sleeveForwarder) OverlayType() string {
func (fwd *sleeveForwarder) DisplayName() string {
return "sleeve"
}

Expand Down
2 changes: 1 addition & 1 deletion router/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func NewLocalConnectionStatusSlice(cm *ConnectionMaker) []LocalConnectionStatus
state = "established"
}
lc, _ := conn.(*LocalConnection)
info := fmt.Sprintf("%-6v %v", lc.forwarder.OverlayType(), conn.Remote())
info := fmt.Sprintf("%-6v %v", lc.forwarder.DisplayName(), conn.Remote())
slice = append(slice, LocalConnectionStatus{conn.RemoteTCPAddr(), conn.Outbound(), state, info})
}
for address, target := range cm.targets {
Expand Down

0 comments on commit 15beaa7

Please sign in to comment.