chore: Prepare 0.2 release (#321)

Signed-off-by: Lucio Franco <luciofranco14@gmail.com>
This commit is contained in:
Lucio Franco
2020-04-01 14:34:51 -04:00
committed by GitHub
parent b7860cc734
commit 6f378e2bd0
10 changed files with 73 additions and 12 deletions
+31
View File
@@ -1,3 +1,34 @@
# [0.2.0](https://github.com/hyperium/tonic/compare/v0.1.1...v0.2.0) (2020-04-01)
### Bug Fixes
* **build:** Allow non_camel_case_types on codegen structs ([224280d](https://github.com/hyperium/tonic/commit/224280dfff8944e9e553337416d23d6e5a050945)), closes [#295](https://github.com/hyperium/tonic/issues/295)
* **build:** Don't replace extern_paths ([#261](https://github.com/hyperium/tonic/issues/261)) ([1b3d107](https://github.com/hyperium/tonic/commit/1b3d107206136312a2536d3b72748c52191d99b1))
* **build:** Ignore non `.rs` files with rustfmt ([#284](https://github.com/hyperium/tonic/issues/284)) ([7dfa2a2](https://github.com/hyperium/tonic/commit/7dfa2a277b593e008cea53eef7163ca59a06c56a)), closes [#283](https://github.com/hyperium/tonic/issues/283)
* **build:** Implement Debug for client struct ([6dbe88d](https://github.com/hyperium/tonic/commit/6dbe88d445e378fff48d05083c23baeb2020cb2d)), closes [#298](https://github.com/hyperium/tonic/issues/298)
* **build:** Remove debug println! ([#287](https://github.com/hyperium/tonic/issues/287)) ([e2c2be2](https://github.com/hyperium/tonic/commit/e2c2be2f084b7c1ef4e93f6994cb9c728de0c1ed))
* **build:** Server service uses generic body bound ([#306](https://github.com/hyperium/tonic/issues/306)) ([5758b75](https://github.com/hyperium/tonic/commit/5758b758b2d44059b0149a31542d11589999a789))
* **health:** Set referenced version of tonic ([59c7788](https://github.com/hyperium/tonic/commit/59c77888464a0302993dbe07fed7c1848b415f8f))
* **metadata:** Remove deprecated error description ([61e0429](https://github.com/hyperium/tonic/commit/61e0429ae810354363835c36a046b5113b3c74b4))
* **transport:** Handle tls accepting on task ([#320](https://github.com/hyperium/tonic/issues/320)) ([04a8c0c](https://github.com/hyperium/tonic/commit/04a8c0c82a4007f48c3bf3539a3f2312746fedd1))
### Features
* **build:** Add support for custom prost config ([#318](https://github.com/hyperium/tonic/issues/318)) ([202093c](https://github.com/hyperium/tonic/commit/202093c31715b52997c6c206c758924ff5f69bc8))
* **health:** Add tonic-health server impl ([da92dbf](https://github.com/hyperium/tonic/commit/da92dbf8aa885ea0ea05755e9432532fc980e353)), closes [#135](https://github.com/hyperium/tonic/issues/135) [#135](https://github.com/hyperium/tonic/issues/135)
* Add Status with Details Constructor ([#308](https://github.com/hyperium/tonic/issues/308)) ([cfd59db](https://github.com/hyperium/tonic/commit/cfd59dbb342a8b7d216f4856e13d24b564c606f3))
* **build:** Decouple codgen from `prost` ([#170](https://github.com/hyperium/tonic/issues/170)) ([f65cda1](https://github.com/hyperium/tonic/commit/f65cda1ea0a190fe07c4f8d91473baad9a6f1f77))
* **transport:** Expose http2 keep-alive support ([#307](https://github.com/hyperium/tonic/issues/307)) ([012fa3c](https://github.com/hyperium/tonic/commit/012fa3cb4a0e010dafa28305416fab6c4278fc7b))
### BREAKING CHANGES
* Bumped `rustls` to `0.17`.
* Removed deprecated `Error::description` implementations.
# [0.1.1](https://github.com/hyperium/tonic/compare/v0.1.0...v0.1.1) (2020-01-20)
+2 -2
View File
@@ -113,12 +113,12 @@ name = "helloworld-client"
path = "src/client.rs"
[dependencies]
tonic = "0.1"
tonic = "0.2"
prost = "0.6"
tokio = { version = "0.2", features = ["macros"] }
[build-dependencies]
tonic-build = "0.1.0"
tonic-build = "0.2"
```
We include `tonic-build` as a useful way to incorporate the generation of our client and server gRPC code into the build process of our application. We will setup this build process now:
+2 -2
View File
@@ -180,7 +180,7 @@ Edit `Cargo.toml` and add all the dependencies we'll need for this example:
```toml
[dependencies]
tonic = "0.1"
tonic = "0.2"
prost = "0.6"
futures-core = "0.3"
futures-util = "0.3"
@@ -192,7 +192,7 @@ serde_json = "1.0"
rand = "0.7"
[build-dependencies]
tonic-build = "0.1.0"
tonic-build = "0.2"
```
Create a `build.rs` file at the root of your crate:
+2 -2
View File
@@ -1,10 +1,10 @@
[package]
name = "tonic-build"
version = "0.1.1"
version = "0.2.0"
authors = ["Lucio Franco <luciofranco14@gmail.com>"]
edition = "2018"
license = "MIT"
documentation = "https://docs.rs/tonic/0.1.0/tonic/"
documentation = "https://docs.rs/tonic/0.2.0/tonic/"
repository = "https://github.com/hyperium/tonic"
homepage = "https://github.com/hyperium/tonic"
description = """
+1 -1
View File
@@ -52,7 +52,7 @@
#![doc(
html_logo_url = "https://github.com/hyperium/tonic/raw/master/.github/assets/tonic-docs.png"
)]
#![doc(html_root_url = "https://docs.rs/tonic-build/0.1.0")]
#![doc(html_root_url = "https://docs.rs/tonic-build/0.2.0")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
#![cfg_attr(docsrs, feature(doc_cfg))]
+2 -2
View File
@@ -20,7 +20,7 @@ transport = ["tonic/transport"]
[dependencies]
async-stream = "0.2"
tokio = { version = "0.2", features = ["sync", "stream"] }
tonic = { version = "0.1", path = "../tonic", features = ["codegen", "prost"] }
tonic = { version = "0.2", path = "../tonic", features = ["codegen", "prost"] }
bytes = "0.5"
prost = "0.6"
@@ -28,4 +28,4 @@ prost = "0.6"
tokio = { version = "0.2", features = ["rt-core", "macros"]}
[build-dependencies]
tonic-build = { version = "0.1", path = "../tonic-build" }
tonic-build = { version = "0.2", path = "../tonic-build" }
+26
View File
@@ -1,6 +1,29 @@
//! A `tonic` based gRPC healthcheck implementation.
//!
//! # Example
//!
//! An example can be found [here].
//!
//! [here]: https://github.com/hyperium/tonic/blob/master/examples/src/health/server.rs
#![warn(
missing_debug_implementations,
missing_docs,
rust_2018_idioms,
unreachable_pub
)]
#![doc(
html_logo_url = "https://github.com/hyperium/tonic/raw/master/.github/assets/tonic-docs.png"
)]
#![doc(html_root_url = "https://docs.rs/tonic/0.2.0")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
#![cfg_attr(docsrs, feature(doc_cfg))]
use std::fmt::{Display, Formatter};
mod proto {
#![allow(unreachable_pub)]
tonic::include_proto!("grpc.health.v1");
}
@@ -9,8 +32,11 @@ pub mod server;
/// An enumeration of values representing gRPC service health.
#[derive(Copy, Clone, Debug, PartialEq)]
pub enum ServingStatus {
/// Unknown status
Unknown,
/// The service is currently up and serving requests.
Serving,
/// The service is currently down and not serving requests.
NotServing,
}
+4
View File
@@ -1,3 +1,5 @@
//! Contains all healthcheck based server utilities.
use crate::proto::health_server::{Health, HealthServer};
use crate::proto::{HealthCheckRequest, HealthCheckResponse};
use crate::ServingStatus;
@@ -46,6 +48,7 @@ impl HealthReporter {
/// Sets the status of the service implemented by `S` to `Serving`. This notifies any watchers
/// if there is a change in status.
#[cfg(feature = "transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "transport")))]
pub async fn set_serving<S>(&mut self)
where
S: NamedService,
@@ -58,6 +61,7 @@ impl HealthReporter {
/// Sets the status of the service implemented by `S` to `NotServing`. This notifies any watchers
/// if there is a change in status.
#[cfg(feature = "transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "transport")))]
pub async fn set_not_serving<S>(&mut self)
where
S: NamedService,
+2 -2
View File
@@ -8,11 +8,11 @@ name = "tonic"
# - README.md
# - Update CHANGELOG.md.
# - Create "v0.1.x" git tag.
version = "0.1.1"
version = "0.2.0"
authors = ["Lucio Franco <luciofranco14@gmail.com>"]
edition = "2018"
license = "MIT"
documentation = "https://docs.rs/tonic/0.1.0/tonic/"
documentation = "https://docs.rs/tonic/0.2.0/tonic/"
repository = "https://github.com/hyperium/tonic"
homepage = "https://github.com/hyperium/tonic"
description = """
+1 -1
View File
@@ -71,7 +71,7 @@
#![doc(
html_logo_url = "https://github.com/hyperium/tonic/raw/master/.github/assets/tonic-docs.png"
)]
#![doc(html_root_url = "https://docs.rs/tonic/0.1.0")]
#![doc(html_root_url = "https://docs.rs/tonic/0.2.0")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
#![cfg_attr(docsrs, feature(doc_cfg))]