add muxer type to json output

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
This commit is contained in:
Jeromy 2016-11-04 11:43:17 -07:00
parent 4a029c7374
commit 795b3cc4c7

View File

@ -88,6 +88,11 @@ var swarmPeersCmd = &cmds.Command{
Peer: pid.Pretty(),
}
swcon, ok := c.(*swarm.Conn)
if ok {
ci.Muxer = fmt.Sprintf("%T", swcon.StreamConn().Conn())
}
if verbose || latency {
ci.Latency = n.Peerstore.LatencyEWMA(pid).String()
}
@ -147,6 +152,7 @@ type connInfo struct {
Addr string
Peer string
Latency string
Muxer string
Streams []streamInfo
}