Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(transport): Deprecate re-exported NamedService #1521

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion interop/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::pin::Pin;
use std::task::{Context, Poll};
use std::time::Duration;
use tokio_stream::StreamExt;
use tonic::{body::BoxBody, transport::NamedService, Code, Request, Response, Status};
use tonic::{body::BoxBody, server::NamedService, Code, Request, Response, Status};
use tower::Service;

pub use pb::test_service_server::TestServiceServer;
Expand Down
3 changes: 2 additions & 1 deletion tests/integration_tests/tests/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use std::{
use tokio::sync::oneshot;
use tonic::{
body::BoxBody,
transport::{Endpoint, NamedService, Server},
server::NamedService,
transport::{Endpoint, Server},
Request, Response, Status,
};
use tower_service::Service;
Expand Down
1 change: 1 addition & 0 deletions tonic/src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ pub use self::server::Server;
pub use self::service::grpc_timeout::TimeoutExpired;
pub use self::tls::Certificate;
#[doc(inline)]
/// A deprecated re-export. Please use `tonic::server::NamedService` directly.
pub use crate::server::NamedService;
pub use axum::{body::BoxBody as AxumBoxBody, Router as AxumRouter};
pub use hyper::{Body, Uri};
Expand Down
2 changes: 2 additions & 0 deletions tonic/src/transport/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ mod unix;
pub use super::service::Routes;
pub use super::service::RoutesBuilder;

#[doc(inline)]
/// A deprecated re-export. Please use `tonic::server::NamedService` directly.
pub use crate::server::NamedService;
pub use conn::{Connected, TcpConnectInfo};
#[cfg(feature = "tls")]
Expand Down