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:
toml
[dependencies]
vitess-grpc = "0.1"
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:
shell
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 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.