etcdserverpb: define LeaseLeases API
@@ -112,7 +112,13 @@ service Lease {
};
}
- // TODO(xiangli) List all existing Leases?
+ // LeaseLeases lists all existing leases.
+ rpc LeaseLeases(LeaseLeasesRequest) returns (LeaseLeasesResponse) {
+ option (google.api.http) = {
+ post: "/v3alpha/kv/lease/leases"
+ body: "*"
+ };
+ }
}
service Cluster {
@@ -757,6 +763,19 @@ message LeaseTimeToLiveResponse {
repeated bytes keys = 5;
}
+message LeaseLeasesRequest {
+}
+
+message LeaseStatus {
+ int64 ID = 1;
+ // TODO: int64 TTL = 2;
+}
+
+message LeaseLeasesResponse {
+ ResponseHeader header = 1;
+ repeated LeaseStatus leases = 2;
+}
+
message Member {
// ID is the member ID for this member.
uint64 ID = 1;
