summaryrefslogtreecommitdiff
path: root/ext/kv/interface.rs
diff options
context:
space:
mode:
authorHeyang Zhou <zhy20000919@hotmail.com>2023-08-22 13:56:00 +0800
committerGitHub <noreply@github.com>2023-08-22 13:56:00 +0800
commit6d4a005e4108a5dd762b339a02bc4d802755ba0d (patch)
tree69679038bfbd3127f6c1e1b85dbc347c8c52e36e /ext/kv/interface.rs
parent5834d282d4de5d0b5cacb9bf068f3896bef0a48a (diff)
feat(ext/kv): connect to remote database (#20178)
This patch adds a `remote` backend for `ext/kv`. This supports connection to Deno Deploy and potentially other services compatible with the KV Connect protocol.
Diffstat (limited to 'ext/kv/interface.rs')
-rw-r--r--ext/kv/interface.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/kv/interface.rs b/ext/kv/interface.rs
index 28b43f8d7..abeaf8dd5 100644
--- a/ext/kv/interface.rs
+++ b/ext/kv/interface.rs
@@ -29,16 +29,21 @@ pub trait Database {
async fn snapshot_read(
&self,
+ state: Rc<RefCell<OpState>>,
requests: Vec<ReadRange>,
options: SnapshotReadOptions,
) -> Result<Vec<ReadRangeOutput>, AnyError>;
async fn atomic_write(
&self,
+ state: Rc<RefCell<OpState>>,
write: AtomicWrite,
) -> Result<Option<CommitResult>, AnyError>;
- async fn dequeue_next_message(&self) -> Result<Self::QMH, AnyError>;
+ async fn dequeue_next_message(
+ &self,
+ state: Rc<RefCell<OpState>>,
+ ) -> Result<Self::QMH, AnyError>;
fn close(&self);
}