Git Product home page Git Product logo

vitess-grpc-rust's Introduction

gRPC Client for Vitess

Crates.io Docs.rs Tests Checks

This is a Rust gRPC client for Vitess. It is generated from the Vitess proto files using tonic.

Usage

To use this crate, add the following to your Cargo.toml:

[dependencies]
vitess-grpc = "0.3"
tokio = { version = "1.0", features = ["full"] }

Example

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.

Versioning

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.

License

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.

Vitess Update Process

When a new version of Vitess is released, the following steps should be taken to update this crate:

  1. Update the version in vitess-grpc/Cargo.toml to the new Vitess version.
  2. Run script/update-protos to update the proto files in the vitess-grpc/proto directory.
  3. Run cargo build to make sure the crate builds.
  4. Run scripts/start-vttestserver to start a local Vitess cluster used for testing.
  5. Run cargo test to make sure the tests pass.
  6. Stop the local Vitess cluster by running scripts/stop-vttestserver.
  7. Commit the changes and push them to GitHub.
  8. Change directory to vitess-grpc
  9. Publish the crate to crates.io with cargo publish.

vitess-grpc-rust's People

Contributors

dependabot[bot] avatar jonhoo avatar kovyrin avatar simenb avatar tudyx avatar wasabi375 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.