aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v/router.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-01-26 16:19:04 +0000
committerAlex <alex@adnab.me>2023-01-26 16:19:04 +0000
commit246f7468cd18c8ef4f3c0c4c209853cd2500cc76 (patch)
tree6e5f9ddd2159ba5396cc441a82b8240c4306323f /src/api/k2v/router.rs
parent611792ddcf86f0a728e22abaa6e172d3679d5ca6 (diff)
parent1dff62564fdda392a97986dca55232f30a1f4234 (diff)
downloadgarage-246f7468cd18c8ef4f3c0c4c209853cd2500cc76.tar.gz
garage-246f7468cd18c8ef4f3c0c4c209853cd2500cc76.zip
Merge pull request 'K2V PollRange, version 2' (#471) from k2v-watch-range-2 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/471
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,