weed shell: list volumes

This commit is contained in:
Chris Lu
2019-03-17 20:27:08 -07:00
parent 22fbbf023b
commit aca653c08b
13 changed files with 643 additions and 127 deletions

View File

@@ -126,3 +126,16 @@ func (ms *MasterServer) Statistics(ctx context.Context, req *master_pb.Statistic
return resp, nil
}
func (ms *MasterServer) VolumeList(ctx context.Context, req *master_pb.VolumeListRequest) (*master_pb.VolumeListResponse, error) {
if !ms.Topo.IsLeader() {
return nil, raft.NotLeaderError
}
resp := &master_pb.VolumeListResponse{
TopologyInfo: ms.Topo.ToTopologyInfo(),
}
return resp, nil
}