summaryrefslogtreecommitdiff
path: root/ext/kv/proto
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2023-10-31 12:13:57 +0100
committerGitHub <noreply@github.com>2023-10-31 11:13:57 +0000
commit2d9298f5f5550c21ba218ff7095aa9afe80c7e02 (patch)
tree6daee1cc6007745097e176c7367b697e58632baf /ext/kv/proto
parent092555c611ebab87ad570b4dcb73d54288dccdd9 (diff)
chore: update ext/kv to use denokv_* crates (#20986)
This commit updates the ext/kv module to use the denokv_* crates for the protocol and the sqlite backend. This also fixes a couple of bugs in the sqlite backend, and updates versionstamps to be updated less linearly.
Diffstat (limited to 'ext/kv/proto')
-rw-r--r--ext/kv/proto/datapath.proto97
-rw-r--r--ext/kv/proto/mod.rs7
2 files changed, 0 insertions, 104 deletions
diff --git a/ext/kv/proto/datapath.proto b/ext/kv/proto/datapath.proto
deleted file mode 100644
index 59793000b..000000000
--- a/ext/kv/proto/datapath.proto
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-syntax = "proto3";
-
-package datapath;
-
-message SnapshotRead {
- repeated ReadRange ranges = 1;
-}
-
-message SnapshotReadOutput {
- repeated ReadRangeOutput ranges = 1;
- bool read_disabled = 2;
- repeated string regions_if_read_disabled = 3;
- bool read_is_strongly_consistent = 4;
- string primary_if_not_strongly_consistent = 5;
-}
-
-message ReadRange {
- bytes start = 1;
- bytes end = 2;
- int32 limit = 3;
- bool reverse = 4;
-}
-
-message ReadRangeOutput {
- repeated KvEntry values = 1;
-}
-
-message AtomicWrite {
- repeated KvCheck kv_checks = 1;
- repeated KvMutation kv_mutations = 2;
- repeated Enqueue enqueues = 3;
-}
-
-message AtomicWriteOutput {
- AtomicWriteStatus status = 1;
- bytes versionstamp = 2;
- string primary_if_write_disabled = 3;
-}
-
-message KvCheck {
- bytes key = 1;
- bytes versionstamp = 2; // 10-byte raw versionstamp
-}
-
-message KvMutation {
- bytes key = 1;
- KvValue value = 2;
- KvMutationType mutation_type = 3;
- int64 expire_at_ms = 4;
-}
-
-message KvValue {
- bytes data = 1;
- KvValueEncoding encoding = 2;
-}
-
-message KvEntry {
- bytes key = 1;
- bytes value = 2;
- KvValueEncoding encoding = 3;
- bytes versionstamp = 4;
-}
-
-enum KvMutationType {
- M_UNSPECIFIED = 0;
- M_SET = 1;
- M_CLEAR = 2;
- M_SUM = 3;
- M_MAX = 4;
- M_MIN = 5;
-}
-
-enum KvValueEncoding {
- VE_UNSPECIFIED = 0;
- VE_V8 = 1;
- VE_LE64 = 2;
- VE_BYTES = 3;
-}
-
-enum AtomicWriteStatus {
- AW_UNSPECIFIED = 0;
- AW_SUCCESS = 1;
- AW_CHECK_FAILURE = 2;
- AW_UNSUPPORTED_WRITE = 3;
- AW_USAGE_LIMIT_EXCEEDED = 4;
- AW_WRITE_DISABLED = 5;
- AW_QUEUE_BACKLOG_LIMIT_EXCEEDED = 6;
-}
-
-message Enqueue {
- bytes payload = 1;
- int64 deadline_ms = 2;
- repeated bytes kv_keys_if_undelivered = 3;
- repeated uint32 backoff_schedule = 4;
-}
diff --git a/ext/kv/proto/mod.rs b/ext/kv/proto/mod.rs
deleted file mode 100644
index d258a0551..000000000
--- a/ext/kv/proto/mod.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-// Generated code, disable lints
-#[allow(clippy::all, non_snake_case)]
-pub mod datapath {
- include!(concat!(env!("OUT_DIR"), "/datapath.rs"));
-}