Skip to content
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
7 changes: 5 additions & 2 deletions linkerd/http/upgrade/src/glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct UpgradeBody<B = BoxBody> {
/// to be inserted into the Http11Upgrade half.
#[pin]
body: B,
pub(super) upgrade: Option<(Http11Upgrade, hyper::upgrade::OnUpgrade)>,
upgrade: Option<(Http11Upgrade, hyper::upgrade::OnUpgrade)>,
}

/// Glue for any `tokio_connect::Connect` to implement `hyper::client::Connect`.
Expand Down Expand Up @@ -113,7 +113,10 @@ impl<B: Default> Default for UpgradeBody<B> {
}

impl<B> UpgradeBody<B> {
pub fn new(body: B, upgrade: Option<(Http11Upgrade, hyper::upgrade::OnUpgrade)>) -> Self {
pub(crate) fn new(
body: B,
upgrade: Option<(Http11Upgrade, hyper::upgrade::OnUpgrade)>,
) -> Self {
Self { body, upgrade }
}
}
Expand Down
8 changes: 4 additions & 4 deletions linkerd/http/upgrade/src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ pub struct Http11Upgrade {
/// A named "tuple" returned by `Http11Upgade::new()` of the two halves of
/// an upgrade.
#[derive(Debug)]
pub struct Http11UpgradeHalves {
struct Http11UpgradeHalves {
/// The "server" half.
pub server: Http11Upgrade,
server: Http11Upgrade,
/// The "client" half.
pub client: Http11Upgrade,
client: Http11Upgrade,
}

/// A marker type inserted into Extensions to signal it was an HTTP CONNECT
Expand Down Expand Up @@ -70,7 +70,7 @@ impl Http11Upgrade {
///
/// Each handle is used to insert 1 half of the upgrade. When both handles
/// have inserted, the upgrade future will be spawned onto the executor.
pub fn halves(upgrade_drain_signal: drain::Watch) -> Http11UpgradeHalves {
fn halves(upgrade_drain_signal: drain::Watch) -> Http11UpgradeHalves {
let inner = Arc::new(Inner {
server: TryLock::new(None),
client: TryLock::new(None),
Expand Down
2 changes: 1 addition & 1 deletion linkerd/proxy/http/src/h1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ where
}

/// Checks responses to determine if they are successful HTTP upgrades.
pub(crate) fn is_upgrade<B>(res: &http::Response<B>) -> bool {
fn is_upgrade<B>(res: &http::Response<B>) -> bool {
#[inline]
fn is_connect_success<B>(res: &http::Response<B>) -> bool {
res.extensions().get::<HttpConnect>().is_some() && res.status().is_success()
Expand Down
Loading