mirror of https://github.com/status-im/consul.git
agent: display messages from serf in cli (#5236)
* display messages from serf in cli
This commit is contained in:
parent
2abc48c1eb
commit
174099593a
|
@ -16,6 +16,9 @@ type KeyringResponse struct {
|
|||
// Segment has the network segment this request corresponds to.
|
||||
Segment string
|
||||
|
||||
// Messages has information or errors from serf
|
||||
Messages map[string]string `json:",omitempty"`
|
||||
|
||||
// A map of the encryption keys to the number of nodes they're installed on
|
||||
Keys map[string]int
|
||||
|
||||
|
|
|
@ -154,6 +154,11 @@ func (c *cmd) handleList(responses []*consulapi.KeyringResponse) {
|
|||
|
||||
c.UI.Output("")
|
||||
c.UI.Output(pool + ":")
|
||||
|
||||
for from, msg := range response.Messages {
|
||||
c.UI.Output(fmt.Sprintf(" ===> %s: %s", from, msg))
|
||||
}
|
||||
|
||||
for key, num := range response.Keys {
|
||||
c.UI.Output(fmt.Sprintf(" %s [%d/%d]", key, num, response.NumNodes))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue