Skip to content

Commit 0f42a11

Browse files
committed
Add KvStoreTestSuite.
1 parent 5ccc919 commit 0f42a11

File tree

4 files changed

+630
-2
lines changed

4 files changed

+630
-2
lines changed

rust/api/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ edition = "2021"
77
async-trait = "0.1.77"
88
prost = { version = "0.11.6", default-features = false, features = ["std", "prost-derive"] }
99
bytes = "1.4.0"
10+
rand = { version = "0.8.5", optional = true}
1011

1112
[target.'cfg(genproto)'.build-dependencies]
1213
prost-build = { version = "0.11.3" }
1314
reqwest = { version = "0.11.13", default-features = false, features = ["rustls-tls", "blocking"] }
15+
16+
[dev-dependencies]
17+
18+
[features]
19+
_test_utils =["rand"]

rust/api/src/kv_store.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ use crate::types::{
55
};
66
use async_trait::async_trait;
77

8-
pub(crate) const GLOBAL_VERSION_KEY: &str = "global_version";
9-
pub(crate) const INITIAL_RECORD_VERSION: i32 = 1;
8+
/// The key used to store and retrieve the global version of the store.
9+
pub const GLOBAL_VERSION_KEY: &str = "global_version";
10+
11+
/// The initial version number assigned to newly created records.
12+
pub const INITIAL_RECORD_VERSION: i32 = 1;
1013

1114
/// An interface that must be implemented by every backend implementation of VSS.
1215
#[async_trait]

0 commit comments

Comments
 (0)