Skip to content

Commit

Permalink
chore(transport): Deprecate re-exported NamedService
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Oct 23, 2023
1 parent d5c14fa commit 4c7f2f5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
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

0 comments on commit 4c7f2f5

Please sign in to comment.