mirror of https://github.com/tikv/client-rust.git
Introduce internals.tidb.io in README (#319)
* update readme.md Signed-off-by: ekexium <ekexium@gmail.com> * fix clippy Signed-off-by: ekexium <ekexium@gmail.com> * ci: update commands for tiup 1.6 Signed-off-by: ekexium <ekexium@gmail.com> * fix fmt Signed-off-by: ekexium <ekexium@gmail.com> * remove SIG-related stuff in README Signed-off-by: ekexium <ekexium@gmail.com>
This commit is contained in:
parent
eb1d2da05c
commit
9eced92d14
|
@ -105,6 +105,6 @@ jobs:
|
|||
- name: install tiup
|
||||
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
|
||||
- name: start tiup playground
|
||||
run: /home/runner/.tiup/bin/tiup playground nightly --mode tikv-slim --kv 3 --monitor false --kv.config /home/runner/work/client-rust/client-rust/config/tikv.toml --pd.config /home/runner/work/client-rust/client-rust/config/pd.toml &
|
||||
run: /home/runner/.tiup/bin/tiup playground nightly --mode tikv-slim --kv 3 --without-monitor --kv.config /home/runner/work/client-rust/client-rust/config/tikv.toml --pd.config /home/runner/work/client-rust/client-rust/config/pd.toml &
|
||||
- name: integration test
|
||||
run: make integration-test
|
||||
|
|
2
Makefile
2
Makefile
|
@ -31,6 +31,6 @@ doc:
|
|||
# docker: docker-pd docker-kv
|
||||
|
||||
tiup:
|
||||
tiup playground nightly --mode tikv-slim --kv 3 --monitor false --kv.config $(shell pwd)/config/tikv.toml --pd.config $(shell pwd)/config/pd.toml &
|
||||
tiup playground nightly --mode tikv-slim --kv 3 --without-monitor --kv.config $(shell pwd)/config/tikv.toml --pd.config $(shell pwd)/config/pd.toml &
|
||||
|
||||
all: check doc test
|
||||
|
|
|
@ -137,6 +137,8 @@ Please follow PingCAP's [Rust style guide](https://pingcap.github.io/style-guid
|
|||
|
||||
## Getting help
|
||||
|
||||
If you need help, either to find something to work on, or with any technical problem, the easiest way to get it is via Slack. We monitor the client-rust (better for general client questions) and sig-transaction (better for technical questions about TiKV's transaction protocol) channels on the [tikv-wg slack](https://tikv.org/chat).
|
||||
If you need help, either to find something to work on, or with any technical problem, the easiest way to get it is via internals.tidb.io, the forum for TiDB developers.
|
||||
|
||||
You can also get help on GitHub issues or PRs directly. You can just ask a question; if you don't get a response, you should ping @nrc or @ekexium.
|
||||
You can also ask in Slack. We monitor the #client-rust channel on the [tikv-wg slack](https://tikv.org/chat).
|
||||
|
||||
You can just ask a question on GitHub issues or PRs directly; if you don't get a response, you should ping @ekexium or @andylokandy.
|
||||
|
|
|
@ -9,13 +9,11 @@ use tikv_client_proto::pdpb::*;
|
|||
pub const MOCK_PD_PORT: u16 = 50021;
|
||||
/// This is mock pd server, used with mock tikv server.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct MockPd {
|
||||
ts: i64,
|
||||
}
|
||||
pub struct MockPd {}
|
||||
|
||||
impl MockPd {
|
||||
fn new() -> MockPd {
|
||||
MockPd { ts: 0 }
|
||||
MockPd {}
|
||||
}
|
||||
|
||||
fn region() -> tikv_client_proto::metapb::Region {
|
||||
|
|
|
@ -195,8 +195,8 @@ pub trait PdClient: Send + Sync + 'static {
|
|||
|
||||
fn decode_region(mut region: RegionWithLeader, enable_codec: bool) -> Result<RegionWithLeader> {
|
||||
if enable_codec {
|
||||
codec::decode_bytes_in_place(&mut region.region.mut_start_key(), false)?;
|
||||
codec::decode_bytes_in_place(&mut region.region.mut_end_key(), false)?;
|
||||
codec::decode_bytes_in_place(region.region.mut_start_key(), false)?;
|
||||
codec::decode_bytes_in_place(region.region.mut_end_key(), false)?;
|
||||
}
|
||||
Ok(region)
|
||||
}
|
||||
|
|
|
@ -74,7 +74,9 @@ impl Client<PdRpcClient> {
|
|||
/// vec!["192.168.0.100"],
|
||||
/// Config::default().with_timeout(Duration::from_secs(60)),
|
||||
/// None,
|
||||
/// ).await.unwrap();
|
||||
/// )
|
||||
/// .await
|
||||
/// .unwrap();
|
||||
/// # });
|
||||
/// ```
|
||||
pub async fn new_with_config<S: Into<String>>(
|
||||
|
|
|
@ -51,7 +51,9 @@ impl Client {
|
|||
/// # use tikv_client::{Config, TransactionClient};
|
||||
/// # use futures::prelude::*;
|
||||
/// # futures::executor::block_on(async {
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None).await.unwrap();
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None)
|
||||
/// .await
|
||||
/// .unwrap();
|
||||
/// # });
|
||||
/// ```
|
||||
pub async fn new<S: Into<String>>(
|
||||
|
@ -79,7 +81,9 @@ impl Client {
|
|||
/// vec!["192.168.0.100"],
|
||||
/// Config::default().with_timeout(Duration::from_secs(60)),
|
||||
/// None,
|
||||
/// ).await.unwrap();
|
||||
/// )
|
||||
/// .await
|
||||
/// .unwrap();
|
||||
/// # });
|
||||
/// ```
|
||||
pub async fn new_with_config<S: Into<String>>(
|
||||
|
@ -117,7 +121,9 @@ impl Client {
|
|||
/// # use tikv_client::{Config, TransactionClient};
|
||||
/// # use futures::prelude::*;
|
||||
/// # futures::executor::block_on(async {
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None).await.unwrap();
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None)
|
||||
/// .await
|
||||
/// .unwrap();
|
||||
/// let mut transaction = client.begin_optimistic().await.unwrap();
|
||||
/// // ... Issue some commands.
|
||||
/// transaction.commit().await.unwrap();
|
||||
|
@ -140,7 +146,9 @@ impl Client {
|
|||
/// # use tikv_client::{Config, TransactionClient};
|
||||
/// # use futures::prelude::*;
|
||||
/// # futures::executor::block_on(async {
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None).await.unwrap();
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None)
|
||||
/// .await
|
||||
/// .unwrap();
|
||||
/// let mut transaction = client.begin_pessimistic().await.unwrap();
|
||||
/// // ... Issue some commands.
|
||||
/// transaction.commit().await.unwrap();
|
||||
|
@ -160,7 +168,9 @@ impl Client {
|
|||
/// # use tikv_client::{Config, TransactionClient, TransactionOptions};
|
||||
/// # use futures::prelude::*;
|
||||
/// # futures::executor::block_on(async {
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None).await.unwrap();
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None)
|
||||
/// .await
|
||||
/// .unwrap();
|
||||
/// let mut transaction = client
|
||||
/// .begin_with_options(TransactionOptions::default().use_async_commit())
|
||||
/// .await
|
||||
|
@ -190,7 +200,9 @@ impl Client {
|
|||
/// # use tikv_client::{Config, TransactionClient};
|
||||
/// # use futures::prelude::*;
|
||||
/// # futures::executor::block_on(async {
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None).await.unwrap();
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None)
|
||||
/// .await
|
||||
/// .unwrap();
|
||||
/// let timestamp = client.current_timestamp().await.unwrap();
|
||||
/// # });
|
||||
/// ```
|
||||
|
|
|
@ -49,7 +49,9 @@ use tokio::{sync::RwLock, time::Duration};
|
|||
/// # use tikv_client::{Config, TransactionClient};
|
||||
/// # use futures::prelude::*;
|
||||
/// # futures::executor::block_on(async {
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None).await.unwrap();
|
||||
/// let client = TransactionClient::new(vec!["192.168.0.100"], None)
|
||||
/// .await
|
||||
/// .unwrap();
|
||||
/// let mut txn = client.begin_optimistic().await.unwrap();
|
||||
/// let foo = txn.get("foo".to_owned()).await.unwrap().unwrap();
|
||||
/// txn.put("bar".to_owned(), foo).await.unwrap();
|
||||
|
|
Loading…
Reference in New Issue