Skip to content

Commit 795b3cc

Browse files
committed
add muxer type to json output
License: MIT Signed-off-by: Jeromy <[email protected]>
1 parent 4a029c7 commit 795b3cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/commands/swarm.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ var swarmPeersCmd = &cmds.Command{
8888
Peer: pid.Pretty(),
8989
}
9090

91+
swcon, ok := c.(*swarm.Conn)
92+
if ok {
93+
ci.Muxer = fmt.Sprintf("%T", swcon.StreamConn().Conn())
94+
}
95+
9196
if verbose || latency {
9297
ci.Latency = n.Peerstore.LatencyEWMA(pid).String()
9398
}
@@ -147,6 +152,7 @@ type connInfo struct {
147152
Addr string
148153
Peer string
149154
Latency string
155+
Muxer string
150156
Streams []streamInfo
151157
}
152158

0 commit comments

Comments
 (0)