mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: display HashRevision for 127.0.0.1:2379, 1084519789 command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
parent
590911dfe3
commit
48b8210044
@ -233,11 +233,12 @@ func makeEndpointStatusTable(statusList []epStatus) (hdr []string, rows [][]stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
func makeEndpointHashKVTable(hashList []epHashKV) (hdr []string, rows [][]string) {
|
func makeEndpointHashKVTable(hashList []epHashKV) (hdr []string, rows [][]string) {
|
||||||
hdr = []string{"endpoint", "hash"}
|
hdr = []string{"endpoint", "hash", "revision"}
|
||||||
for _, h := range hashList {
|
for _, h := range hashList {
|
||||||
rows = append(rows, []string{
|
rows = append(rows, []string{
|
||||||
h.Ep,
|
h.Ep,
|
||||||
fmt.Sprint(h.Resp.Hash),
|
fmt.Sprint(h.Resp.Hash),
|
||||||
|
fmt.Sprint(h.Resp.HashRevision),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return hdr, rows
|
return hdr, rows
|
||||||
|
@ -212,6 +212,7 @@ func (p *fieldsPrinter) EndpointHashKV(hs []epHashKV) {
|
|||||||
p.hdr(h.Resp.Header)
|
p.hdr(h.Resp.Header)
|
||||||
fmt.Printf("\"Endpoint\" : %q\n", h.Ep)
|
fmt.Printf("\"Endpoint\" : %q\n", h.Ep)
|
||||||
fmt.Println(`"Hash" :`, h.Resp.Hash)
|
fmt.Println(`"Hash" :`, h.Resp.Hash)
|
||||||
|
fmt.Println(`"HashRevision" :`, h.Resp.HashRevision)
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user