Crates.io | vitess-grpc |
lib.rs | vitess-grpc |
version | 0.3.0+vitess-18.0.0 |
source | src |
created_at | 2023-06-05 17:28:55.98195 |
updated_at | 2023-11-11 01:24:59.063265 |
description | Vitess gRPC client library, auto-generated from the Vitess proto files using tonic-build. |
homepage | https://github.com/kovyrin/vitess-grpc-rust |
repository | https://github.com/kovyrin/vitess-grpc-rust.git |
max_upload_size | |
id | 883198 |
size | 1,077,333 |
This is a Rust gRPC client for Vitess. It is generated from the Vitess proto files using tonic.
To use this crate, add the following to your Cargo.toml:
[dependencies]
vitess-grpc = "0.3"
tokio = { version = "1.0", features = ["full"] }
You can find an example of how to use this crate in the examples directory.
Examples can be run with:
cargo run --example <example_name>
Available examples are:
vstream-consumer: A simple vstream consumer, which prints the events it receives.
Before running the examples, you will need to start Vitess locally. An easy way to do this is to use the scripts/start-vttestserver
script, which will start a local Vitess cluster in Docker (or Podman) and configure a simple schema inside you can use for testing.
The version of the crate is independent of the version of Vitess, but contains a build metadata portion (see SemVer documentation for details) that is set to the Vitess version the crate was generated from. For example, the version 0.3.0+vitess18.0.0
means that the crate was generated from the proto files included in Vitess v18.0.0.
The files in the proto
directory are copied from the Vitess repository and are licensed under the Apache License, Version 2.0. See the
Vitess LICENSE file for more details.
The rest of the code in this repository is licensed under the MIT license. See the LICENSE file for more details.
When a new version of Vitess is released, the following steps should be taken to update this crate:
version
in vitess-grpc/Cargo.toml to the new Vitess version.script/update-protos
to update the proto files in the vitess-grpc/proto
directory.cargo build
to make sure the crate builds.scripts/start-vttestserver
to start a local Vitess cluster used for testing.cargo test
to make sure the tests pass.scripts/stop-vttestserver
.cargo publish
.