Fix main.rs in the docker stack example (#212)

* fix main.rs in docker stack example

Signed-off-by: David Ortiz <z.david.ortiz@gmail.com>

* update

Signed-off-by: andylokandy <andylokandy@hotmail.com>

* fix typo

Signed-off-by: andylokandy <andylokandy@hotmail.com>

Co-authored-by: andylokandy <andylokandy@hotmail.com>
This commit is contained in:
David Ortiz 2022-02-18 08:20:31 +01:00 committed by GitHub
parent d045e2f820
commit 77da11c85b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 9 deletions

View File

@ -260,7 +260,7 @@ Next, you'll need to add the TiKV client as a dependency in the `Cargo.toml` fil
```toml
[dependencies]
tikv-client = { git = "https://github.com/tikv/client-rust.git" }
tokio = "0.2.0-alpha.4"
tokio = "1"
```
Then you can edit the `src/main.rs` file with the following:
@ -270,8 +270,7 @@ use tikv_client::{Config, RawClient, Error};
#[tokio::main]
async fn main() -> Result<(), Error> {
let config = Config::new(vec!["http://pd.tikv:2379"]);
let client = RawClient::new(config)?;
let client = RawClient::new(vec!["127.0.0.1:2379"], None).await?;
let key = "TiKV".as_bytes().to_owned();
let value = "Works!".as_bytes().to_owned();

View File

@ -260,7 +260,7 @@ Next, you'll need to add the TiKV client as a dependency in the `Cargo.toml` fil
```toml
[dependencies]
tikv-client = { git = "https://github.com/tikv/client-rust.git" }
tokio = "0.2.0-alpha.4"
tokio = "1"
```
Then you can edit the `src/main.rs` file with the following:
@ -270,8 +270,7 @@ use tikv_client::{Config, RawClient, Error};
#[tokio::main]
async fn main() -> Result<(), Error> {
let config = Config::new(vec!["http://pd.tikv:2379"]);
let client = RawClient::new(config)?;
let client = RawClient::new(vec!["127.0.0.1:2379"], None).await?;
let key = "TiKV".as_bytes().to_owned();
let value = "Works!".as_bytes().to_owned();

View File

@ -260,7 +260,7 @@ Next, you'll need to add the TiKV client as a dependency in the `Cargo.toml` fil
```toml
[dependencies]
tikv-client = { git = "https://github.com/tikv/client-rust.git" }
tokio = "0.2.0-alpha.4"
tokio = "1"
```
Then you can edit the `src/main.rs` file with the following:
@ -270,8 +270,8 @@ use tikv_client::{Config, RawClient, Error};
#[tokio::main]
async fn main() -> Result<(), Error> {
let config = Config::new(vec!["http://pd.tikv:2379"]);
let client = RawClient::new(config)?;
let client = RawClient::new(vec!["127.0.0.1:2379"], None).await?;
let key = "TiKV".as_bytes().to_owned();
let value = "Works!".as_bytes().to_owned();