Skip to content

Commit

Permalink
fix(tonic): add missing interfaces (#223)
Browse files Browse the repository at this point in the history
* re-export `tonic::body`

Signed-off-by: Bugen Zhao <[email protected]>

* add new configuration

Signed-off-by: Bugen Zhao <[email protected]>

* add missing interfaces

Signed-off-by: Bugen Zhao <[email protected]>

* bump version

Signed-off-by: Bugen Zhao <[email protected]>

---------

Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao authored Aug 2, 2024
1 parent 20c915a commit 0b7fd2c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## tonic [0.5.1] - 2024-08-02

### Added

- Add missing APIs for `tonic::transport::Server::builder`.
- Add missing re-exports for `tonic::body`.

## tonic [0.5.0] - 2024-07-31

### Changed
Expand Down
2 changes: 1 addition & 1 deletion madsim-tonic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "madsim-tonic"
version = "0.5.0+0.12.0"
version = "0.5.1+0.12.0"
edition = "2021"
authors = ["Runji Wang <[email protected]>"]
description = "The `tonic` simulator on madsim."
Expand Down
4 changes: 2 additions & 2 deletions madsim-tonic/src/sim.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub use self::codec::Streaming;
pub use tonic::{
async_trait, metadata, service, Code, Extensions, IntoRequest, IntoStreamingRequest, Request,
Response, Status,
async_trait, body, metadata, service, Code, Extensions, IntoRequest, IntoStreamingRequest,
Request, Response, Status,
};

#[macro_export]
Expand Down
14 changes: 14 additions & 0 deletions madsim-tonic/src/transport/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,20 @@ impl<L> Server<L> {
self
}

/// Sets whether to use an adaptive flow control. Defaults to false.
#[must_use]
pub fn http2_adaptive_window(self, _enabled: Option<bool>) -> Self {
// ignore this setting
self
}

/// Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent.
#[must_use]
pub fn http2_max_pending_accept_reset_streams(self, _max: Option<usize>) -> Self {
// ignore this setting
self
}

/// Set whether TCP keepalive messages are enabled on accepted connections.
#[must_use]
pub fn tcp_keepalive(self, _tcp_keepalive: Option<Duration>) -> Self {
Expand Down

0 comments on commit 0b7fd2c

Please sign in to comment.