Skip to content

Commit

Permalink
Prefix all crate names with surrealdb-
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoshu committed Jun 19, 2023
1 parent bd40363 commit 73ee572
Show file tree
Hide file tree
Showing 41 changed files with 189 additions and 189 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "tikv-client"
name = "surrealdb-tikv-client"
version = "0.1.0-surreal.1"
keywords = ["TiKV", "KV", "distributed-systems"]
license = "Apache-2.0"
Expand Down Expand Up @@ -34,16 +34,16 @@ serde_derive = "1.0"
thiserror = "1"
tokio = { version = "1.0", features = [ "sync", "time" ] }

tikv-client-common = { version = "0.1.0-surreal.1", path = "tikv-client-common" }
tikv-client-pd = { version = "0.1.0-surreal.1", path = "tikv-client-pd" }
tikv-client-proto = { version = "0.1.0-surreal.1", path = "tikv-client-proto" }
tikv-client-store = { version = "0.1.0-surreal.1", path = "tikv-client-store" }
surrealdb-tikv-client-common = { version = "0.1.0-surreal.1", path = "tikv-client-common" }
surrealdb-tikv-client-pd = { version = "0.1.0-surreal.1", path = "tikv-client-pd" }
surrealdb-tikv-client-proto = { version = "0.1.0-surreal.1", path = "tikv-client-proto" }
surrealdb-tikv-client-store = { version = "0.1.0-surreal.1", path = "tikv-client-store" }


[dev-dependencies]
clap = "2"
fail = { version = "0.4", features = [ "failpoints" ] }
mock-tikv = {path = "mock-tikv"}
surrealdb-mock-tikv = {path = "mock-tikv"}
proptest = "1"
proptest-derive = "0.3"
serial_test = "0.5.0"
Expand Down
4 changes: 2 additions & 2 deletions mock-tikv/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "mock-tikv"
name = "surrealdb-mock-tikv"
version = "0.0.0"
edition = "2018"

Expand All @@ -8,4 +8,4 @@ derive-new = "0.5"
futures = "0.3"
grpcio = { version = "0.8", features = [ "secure", "prost-codec", "use-bindgen" ], default-features = false }
log = "0.4"
tikv-client-proto = { path = "../tikv-client-proto"}
surrealdb-tikv-client-proto = { path = "../tikv-client-proto"}
14 changes: 7 additions & 7 deletions mock-tikv/src/pd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{spawn_unary_success, MOCK_TIKV_PORT};
use futures::{FutureExt, StreamExt, TryFutureExt};
use grpcio::{Environment, Server, ServerBuilder, WriteFlags};
use std::sync::Arc;
use tikv_client_proto::pdpb::*;
use surrealdb_tikv_client_proto::pdpb::*;

pub const MOCK_PD_PORT: u16 = 50021;
/// This is mock pd server, used with mock tikv server.
Expand All @@ -18,22 +18,22 @@ impl MockPd {
MockPd { ts: 0 }
}

fn region() -> tikv_client_proto::metapb::Region {
tikv_client_proto::metapb::Region {
fn region() -> surrealdb_tikv_client_proto::metapb::Region {
surrealdb_tikv_client_proto::metapb::Region {
start_key: vec![],
end_key: vec![],
peers: vec![Self::leader()],
..Default::default()
}
}

fn leader() -> tikv_client_proto::metapb::Peer {
tikv_client_proto::metapb::Peer::default()
fn leader() -> surrealdb_tikv_client_proto::metapb::Peer {
surrealdb_tikv_client_proto::metapb::Peer::default()
}

fn store() -> tikv_client_proto::metapb::Store {
fn store() -> surrealdb_tikv_client_proto::metapb::Store {
// TODO: start_timestamp?
tikv_client_proto::metapb::Store {
surrealdb_tikv_client_proto::metapb::Store {
address: format!("localhost:{}", MOCK_TIKV_PORT),
..Default::default()
}
Expand Down
Loading

0 comments on commit 73ee572

Please sign in to comment.