Skip to content

Commit

Permalink
Merge pull request #60 from evanlinjin/bug/hypervisor-#29
Browse files Browse the repository at this point in the history
Added 'online' field to hypervisor get node(s) response.
  • Loading branch information
jdknives authored Nov 11, 2019
2 parents 21251cb + 283ae09 commit fee6453
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/hypervisor/hypervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func (m *Node) exec() http.HandlerFunc {

type summaryResp struct {
TCPAddr string `json:"tcp_addr"`
Online bool `json:"online"`
*visor.Summary
}

Expand All @@ -247,6 +248,7 @@ func (m *Node) getNodes() http.HandlerFunc {
}
summaries = append(summaries, summaryResp{
TCPAddr: c.Addr.Addr.String(),
Online: err == nil,
Summary: summary,
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/visor/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func newTransportSummary(tm *transport.Manager, tp *transport.ManagedTransport,
return summary
}

// Summary provides a summary of an AppNode.
// Summary provides a summary of a Skywire Visor.
type Summary struct {
PubKey cipher.PubKey `json:"local_pk"`
NodeVersion string `json:"node_version"`
Expand Down

0 comments on commit fee6453

Please sign in to comment.