add list keys to cache (#352)

* add list keys to cache

* add list keys example
This commit is contained in:
Asim Aslam
2022-01-14 17:38:47 +00:00
committed by GitHub
parent f96ace75c2
commit 6a7d7db044
6 changed files with 250 additions and 50 deletions

View File

@@ -10,6 +10,7 @@ service Cache {
rpc Delete(DeleteRequest) returns (DeleteResponse) {}
rpc Increment(IncrementRequest) returns (IncrementResponse) {}
rpc Decrement(DecrementRequest) returns (DecrementResponse) {}
rpc ListKeys(ListKeysRequest) returns (ListKeysResponse) {}
}
// Get an item from the cache by key. If key is not found, an empty response is returned.
@@ -82,3 +83,12 @@ message DecrementResponse {
// The new value
int64 value = 2;
}
// List all the available keys
message ListKeysRequest {
}
message ListKeysResponse {
repeated string keys = 1;
}