|
@@ -20,9 +20,10 @@ import (
|
|
|
"strings"
|
|
"strings"
|
|
|
|
|
|
|
|
v3 "github.com/coreos/etcd/clientv3"
|
|
v3 "github.com/coreos/etcd/clientv3"
|
|
|
- "github.com/dustin/go-humanize"
|
|
|
|
|
-
|
|
|
|
|
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
|
|
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
|
|
|
|
|
+ "github.com/coreos/etcd/snapshot"
|
|
|
|
|
+
|
|
|
|
|
+ "github.com/dustin/go-humanize"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
type printer interface {
|
|
type printer interface {
|
|
@@ -48,7 +49,7 @@ type printer interface {
|
|
|
MoveLeader(leader, target uint64, r v3.MoveLeaderResponse)
|
|
MoveLeader(leader, target uint64, r v3.MoveLeaderResponse)
|
|
|
|
|
|
|
|
Alarm(v3.AlarmResponse)
|
|
Alarm(v3.AlarmResponse)
|
|
|
- DBStatus(dbstatus)
|
|
|
|
|
|
|
+ DBStatus(snapshot.Status)
|
|
|
|
|
|
|
|
RoleAdd(role string, r v3.AuthRoleAddResponse)
|
|
RoleAdd(role string, r v3.AuthRoleAddResponse)
|
|
|
RoleGet(role string, r v3.AuthRoleGetResponse)
|
|
RoleGet(role string, r v3.AuthRoleGetResponse)
|
|
@@ -150,7 +151,7 @@ func newPrinterUnsupported(n string) printer {
|
|
|
|
|
|
|
|
func (p *printerUnsupported) EndpointStatus([]epStatus) { p.p(nil) }
|
|
func (p *printerUnsupported) EndpointStatus([]epStatus) { p.p(nil) }
|
|
|
func (p *printerUnsupported) EndpointHashKV([]epHashKV) { p.p(nil) }
|
|
func (p *printerUnsupported) EndpointHashKV([]epHashKV) { p.p(nil) }
|
|
|
-func (p *printerUnsupported) DBStatus(dbstatus) { p.p(nil) }
|
|
|
|
|
|
|
+func (p *printerUnsupported) DBStatus(snapshot.Status) { p.p(nil) }
|
|
|
|
|
|
|
|
func (p *printerUnsupported) MoveLeader(leader, target uint64, r v3.MoveLeaderResponse) { p.p(nil) }
|
|
func (p *printerUnsupported) MoveLeader(leader, target uint64, r v3.MoveLeaderResponse) { p.p(nil) }
|
|
|
|
|
|
|
@@ -200,7 +201,7 @@ func makeEndpointHashKVTable(hashList []epHashKV) (hdr []string, rows [][]string
|
|
|
return hdr, rows
|
|
return hdr, rows
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func makeDBStatusTable(ds dbstatus) (hdr []string, rows [][]string) {
|
|
|
|
|
|
|
+func makeDBStatusTable(ds snapshot.Status) (hdr []string, rows [][]string) {
|
|
|
hdr = []string{"hash", "revision", "total keys", "total size"}
|
|
hdr = []string{"hash", "revision", "total keys", "total size"}
|
|
|
rows = append(rows, []string{
|
|
rows = append(rows, []string{
|
|
|
fmt.Sprintf("%x", ds.Hash),
|
|
fmt.Sprintf("%x", ds.Hash),
|