packages/hyprspace: print node names in route show
This commit is contained in:
parent
a4d5782a7f
commit
aadc5f3e7b
3 changed files with 5 additions and 0 deletions
|
@ -42,6 +42,9 @@ func RouteRun(r *cmd.Root, c *cmd.Sub) {
|
|||
} else {
|
||||
target = fmt.Sprintf("/p2p/%s", r.TargetAddr)
|
||||
}
|
||||
if r.TargetName != "" {
|
||||
target = fmt.Sprintf("@%s %s", r.TargetName, target)
|
||||
}
|
||||
if r.IsConnected {
|
||||
connectStatus = " connected"
|
||||
}
|
||||
|
|
|
@ -93,6 +93,7 @@ func (hsr *HyprspaceRPC) Route(args *RouteArgs, reply *RouteReply) error {
|
|||
}
|
||||
routeInfos = append(routeInfos, RouteInfo{
|
||||
Network: rte.Network(),
|
||||
TargetName: rte.Target.Name,
|
||||
TargetAddr: rte.Target.ID,
|
||||
RelayAddr: relayAddr,
|
||||
IsRelay: relay,
|
||||
|
|
|
@ -32,6 +32,7 @@ const (
|
|||
|
||||
type RouteInfo struct {
|
||||
Network net.IPNet
|
||||
TargetName string
|
||||
TargetAddr peer.ID
|
||||
RelayAddr peer.ID
|
||||
IsRelay bool
|
||||
|
|
Loading…
Reference in a new issue