8000 outbound: Clarify Http target types by olix0r · Pull Request #653 · linkerd/linkerd2-proxy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

outbound: Clarify Http target types #653

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

Merged
merged 3 commits into from
Sep 8, 2020
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
5 changes: 1 addition & 4 deletions linkerd/app/gateway/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ impl Config {
R: tower::Service<dns::Name, Response = (dns::Name, IpAddr)> + Send + Clone,
R::Error: Into<Error> + 'static,
R::Future: Send + 'static,
O: tower::Service<outbound::Logical<outbound::HttpEndpoint>, Response = S>
+ Send
+ Clone
+ 'static,
O: tower::Service<outbound::HttpLogical, Response = S> + Send + Clone + 'static,
O::Error: Into<Error> + Send + 'static,
O::Future: Send + 'static,
S: Send
Expand Down
21 changes: 7 additions & 14 deletions linkerd/app/gateway/src/make.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use super::gateway::Gateway;
use futures::{future, ready};
use linkerd2_app_core::proxy::api_resolve::Metadata;
use linkerd2_app_core::proxy::identity;
use linkerd2_app_core::{dns, transport::tls, Error, NameAddr};
use linkerd2_app_core::{dns, proxy::identity, transport::tls, Error, NameAddr};
use linkerd2_app_inbound::endpoint as inbound;
use linkerd2_app_outbound::endpoint as outbound;
use std::future::Future;
Expand Down Expand Up @@ -52,7 +50,7 @@ where
R: tower::Service<dns::Name, Response = (dns::Name, IpAddr)>,
R::Error: Into<Error> + 'static,
R::Future: Send + 'static,
O: tower::Service<outbound::Logical<outbound::HttpEndpoint>> + Send + Clone + 'static,
O: tower::Service<outbound::HttpLogical> + Send + Clone + 'static,
O::Response: Send + 'static,
O::Future: Send + 'static,
O::Error: Into<Error>,
Expand Down Expand Up @@ -119,16 +117,11 @@ where
// Create an outbound target using the resolved IP & name.
let dst_addr = (dst_ip, orig_dst.port()).into();
let dst_name = NameAddr::new(name, orig_dst.port());
let endpoint = outbound::Logical {
addr: dst_name.clone().into(),
inner: outbound::HttpEndpoint {
6A0D addr: dst_addr,
settings: http_settings,
metadata: Metadata::empty(),
identity: tls::PeerIdentity::None(
tls::ReasonForNoPeerName::NotProvidedByServiceDiscovery.into(),
),
},
let endpoint = outbound::HttpLogical {
dst: dst_name.clone().into(),
orig_dst: dst_addr,
settings: http_settings,
require_identity: None,
};

let svc = outbound.call(endpoint).await.map_err(Into::into)?;
Expand Down
Loading
0