Skip to content

Commit 4f2aa62

Browse files
author
Jove Zhong
committed
update READMEs and remove Handover.md
1 parent 5c36d12 commit 4f2aa62

File tree

3 files changed

+21
-94
lines changed

3 files changed

+21
-94
lines changed

Handover.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ This client uses https://crates.io/crates/clickhouse as a dependency.
1414

1515
## Install Proton
1616

17+
Please install Proton as a standalone server or via Docker. Make sure port 8123 is exposed for `pront-rust-client` to connect and run SQL.
18+
1719
### As a single binary
1820

1921
On Linux or Mac, you can install it via `curl https://install.timeplus.com | sh`
@@ -27,11 +29,10 @@ In a separate terminal, connect to the server via `proton client` (Note: If you
2729
### As a Docker container
2830

2931
```bash
30-
docker run -d --pull always --name proton ghcr.io/timeplus-io/proton:latest
32+
docker run -d --pull always --name proton -p 8123:8123 -p 8463:8463 ghcr.io/timeplus-io/proton:latest
3133
```
3234

33-
Proton is automatically started. Open the terminal of the container, and run `proton client`
34-
35+
Proton is automatically started with port 8123 and 8463 exposed. Open the terminal of the container, and run `proton client`
3536

3637
For detailed usage and more information, check out the documentation: https://docs.timeplus.com/proton
3738

examples/README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
## Install Proton
77

8+
Please install Proton as a standalone server or via Docker. Make sure port 8123 is exposed for `pront-rust-client` to connect and run SQL.
9+
810
### As a single binary
911

1012
On Linux or Mac, you can install it via `curl https://install.timeplus.com | sh`
@@ -18,10 +20,10 @@ In a separate terminal, connect to the server via `proton client` (Note: If you
1820
### As a Docker container
1921

2022
```bash
21-
docker run -d --pull always --name proton ghcr.io/timeplus-io/proton:latest
23+
docker run -d --pull always --name proton -p 8123:8123 -p 8463:8463 ghcr.io/timeplus-io/proton:latest
2224
```
2325

24-
Proton is automatically started. Open the terminal of the container, and run `proton client`
26+
Proton is automatically started with port 8123 and 8463 exposed. Open the terminal of the container, and run `proton client`
2527

2628

2729
For detailed usage and more information, check out the documentation: https://docs.timeplus.com/proton
@@ -58,7 +60,7 @@ const FN_NAME: &str = "[prepare]:";
5860
async fn main() -> Result<()> {
5961
println!("{} Start", FN_NAME);
6062

61-
println!("{}Build client", FN_NAME);
63+
println!("{} Build client", FN_NAME);
6264
let client = ProtonClient::new("http://localhost:8123");
6365

6466
println!("{} Create stream if not exists", FN_NAME);
@@ -74,28 +76,30 @@ async fn main() -> Result<()> {
7476

7577
## Run the client code example
7678

79+
In the root folder of `protno-rust-client`
80+
7781
1) Create a stream and insert some data
7882

7983
```
80-
cargo run --bin prepare
84+
cargo run --example prepare
8185
```
8286

8387
Expected output
8488

8589
```
86-
[prepare]: Start
90+
[prepare]:Start
8791
[prepare]:Build client
88-
[prepare]: Create stream if not exists
92+
[prepare]:Create stream if not exists
8993
[prepare]:Insert data
9094
[prepare]:Count inserted data
9195
[prepare]:Inserted data: 1000
92-
[prepare]: Stop
96+
[prepare]:Stop
9397
```
9498

9599
2) Stream some data (fetch) and load all data at once (fetch_all)
96100

97101
```
98-
cargo run --bin main
102+
cargo run --example query
99103
```
100104

101105
Expected output
@@ -110,21 +114,21 @@ MyRow { no: 503, name: "foo" }
110114
MyRow { no: 504, name: "foo" }
111115
[main]:Fetch all data
112116
[MyRowOwned { no: 500, name: "foo" }, MyRowOwned { no: 501, name: "foo" }, MyRowOwned { no: 502, name: "foo" }, MyRowOwned { no: 503, name: "foo" }, MyRowOwned { no: 504, name: "foo" }]
113-
[main]: Stop
117+
[main]:Stop
114118
```
115119

116120
3) Cleanup and delete stream
117121

118122

119123
```
120-
cargo run --bin cleanup
124+
cargo run --example remove
121125
```
122126

123127
Expected output
124128

125129
```
126-
[prepare]: Start
130+
[prepare]:Start
127131
[prepare]:Build client
128-
[prepare]: Delete Stream
129-
[prepare]: Stop
132+
[prepare]:Delete Stream
133+
[prepare]:Stop
130134
```

0 commit comments

Comments
 (0)