aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v/router.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-01-10 15:22:25 +0100
committerAlex Auvolat <alex@adnab.me>2023-01-10 15:22:25 +0100
commitb83517d521b1bea7585ce45a803fad373f28225c (patch)
tree5562397a39647be8d61a9c870103d15c604e09ad /src/api/k2v/router.rs
parent57eabe787948ad6c23eae7761d02545c675bf7ff (diff)
downloadgarage-b83517d521b1bea7585ce45a803fad373f28225c.tar.gz
garage-b83517d521b1bea7585ce45a803fad373f28225c.zip
Implement PollRange API endpoint
Diffstat (limited to 'src/api/k2v/router.rs')
-rw-r--r--src/api/k2v/router.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/api/k2v/router.rs b/src/api/k2v/router.rs
index e7a3dd69..1cc58be5 100644
--- a/src/api/k2v/router.rs
+++ b/src/api/k2v/router.rs
@@ -32,6 +32,9 @@ pub enum Endpoint {
causality_token: String,
timeout: Option<u64>,
},
+ PollRange {
+ partition_key: String,
+ },
ReadBatch {
},
ReadIndex {
@@ -113,6 +116,7 @@ impl Endpoint {
@gen_parser
(query.keyword.take().unwrap_or_default(), partition_key, query, None),
key: [
+ POLL_RANGE => PollRange,
],
no_key: [
EMPTY => ReadBatch,
@@ -142,6 +146,7 @@ impl Endpoint {
@gen_parser
(query.keyword.take().unwrap_or_default(), partition_key, query, None),
key: [
+ POLL_RANGE => PollRange,
],
no_key: [
EMPTY => InsertBatch,
@@ -234,7 +239,8 @@ impl Endpoint {
generateQueryParameters! {
keywords: [
"delete" => DELETE,
- "search" => SEARCH
+ "search" => SEARCH,
+ "poll_range" => POLL_RANGE
],
fields: [
"prefix" => prefix,