Skip to content

Commit

Permalink
update controller client to std::future (#522)
Browse files Browse the repository at this point in the history
This branch updates the proxy's control-plane client to use
`std::future` and Tonic. This should unblock updating the outbound proxy
(as it needs service discovery) and bringing back service profiles.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
hawkw committed May 20, 2020
1 parent 17675e7 commit 02906d5
Show file tree
Hide file tree
Showing 13 changed files with 499 additions and 445 deletions.
33 changes: 25 additions & 8 deletions Cargo.lock
Expand Up @@ -834,9 +834,10 @@ dependencies = [
"linkerd2-app-core",
"linkerd2-app-inbound",
"linkerd2-app-outbound",
"linkerd2-error",
"linkerd2-metrics",
"linkerd2-opencensus",
"linkerd2-proxy-api 0.1.12 (git+https://github.com/linkerd/linkerd2-proxy-api?tag=v0.1.12)",
"linkerd2-proxy-api 0.1.12 (git+https://github.com/linkerd/linkerd2-proxy-api)",
"net2",
"quickcheck",
"regex 1.0.0",
Expand All @@ -849,8 +850,8 @@ dependencies = [
"tokio-current-thread",
"tokio-io",
"tokio-rustls",
"tonic",
"tower 0.1.1",
"tower-grpc",
"tracing",
"tracing-futures 0.1.0",
"webpki",
Expand Down Expand Up @@ -919,9 +920,9 @@ dependencies = [
"tokio 0.2.20",
"tokio-compat",
"tokio-timer",
"tonic",
"tower 0.3.1",
"tower-balance",
"tower-grpc",
"tower-load",
"tower-request-modifier",
"tower-spawn-ready",
Expand Down Expand Up @@ -1147,6 +1148,7 @@ name = "linkerd2-exp-backoff"
version = "0.1.0"
dependencies = [
"futures 0.3.4",
"linkerd2-error",
"pin-project",
"quickcheck",
"rand 0.7.2",
Expand Down Expand Up @@ -1307,6 +1309,23 @@ dependencies = [
"tonic-build",
]

[[package]]
name = "linkerd2-proxy-api"
version = "0.1.12"
source = "git+https://github.com/linkerd/linkerd2-proxy-api#59d91c1d8787f907fbab2de5ca844c25e7aeb9f7"
dependencies = [
"bytes 0.4.11",
"futures 0.1.26",
"h2 0.1.26",
"http 0.1.21",
"prost 0.5.0",
"prost-types 0.5.0",
"quickcheck",
"rand 0.7.2",
"tower-grpc",
"tower-grpc-build",
]

[[package]]
name = "linkerd2-proxy-api-resolve"
version = "0.1.0"
Expand Down Expand Up @@ -1398,7 +1417,6 @@ dependencies = [
"tower 0.3.1",
"tower-balance",
"tower-discover",
"tower-grpc",
"tower-load",
"tracing",
"tracing-futures 0.1.0",
Expand Down Expand Up @@ -3200,11 +3218,10 @@ dependencies = [
[[package]]
name = "tower-request-modifier"
version = "0.1.0"
source = "git+https://github.com/tower-rs/tower-http#044e0ed5ae8b2e9946233b7cc8fc24471b2d126a"
source = "git+https://github.com/tower-rs/tower-http#bd7a4654bdc4e2b5363572e9f66b4dbbc7c0e1ea"
dependencies = [
"futures 0.1.26",
"http 0.1.21",
"tower-service 0.2.0",
"http 0.2.1",
"tower-service 0.3.0",
]

[[package]]
Expand Down
8 changes: 5 additions & 3 deletions linkerd/app/Cargo.toml
Expand Up @@ -21,23 +21,25 @@ linkerd2-app-core = { path = "./core" }
linkerd2-app-inbound = { path = "./inbound" }
linkerd2-app-outbound = { path = "./outbound" }
linkerd2-opencensus = { path = "../opencensus" }
linkerd2-error = { path = "../error" }
regex = "1.0.0"
tokio = "0.1.14"
tower-grpc = { version = "0.1", default-features = false, features = ["protobuf"] }
tonic = { version = "0.2", default-features = false, features = ["prost"] }
tracing = "0.1.9"
tracing-futures = { version = "0.1", features = ["std-future"]}
futures_03 = { package = "futures", version = "0.3" }
tokio-compat = "0.1"
tokio_02 = {package = "tokio", version = "0.2", features = ["rt-util"] }
http-body = "0.3"


[dev-dependencies]
bytes = "0.5"
h2 = "0.2"
http = "0.2"
http-body = "0.3"
hyper = "0.13"
linkerd2-metrics = { path = "../metrics", features = ["test_util"] }
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", features = ["arbitrary"], tag = "v0.1.12" }
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", features = ["arbitrary"] }
net2 = "0.2"
quickcheck = { version = "0.9", default-features = false }
ring = "0.16"
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/core/Cargo.toml
Expand Up @@ -71,7 +71,7 @@ tower-balance = { git = "https://github.com/tower-rs/tower" }
tower-load = { git = "https://github.com/tower-rs/tower" }
tower-request-modifier = { git = "https://github.com/tower-rs/tower-http" }
tower-spawn-ready = { git = "https://github.com/tower-rs/tower" }
tower-grpc = { version = "0.1", default-features = false, features = ["protobuf"] }
tonic = { version = "0.2", default-features = false, features = ["prost"] }
tracing = "0.1.9"
tracing-futures = { version = "0.2", features = ["futures-01"] }
tracing-log = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/core/src/classify.rs
Expand Up @@ -6,7 +6,7 @@ pub use linkerd2_http_classify::{CanClassify, Layer};
use linkerd2_proxy_http::HasH2Reason;
use linkerd2_timeout::error::ResponseTimeout;
use std::borrow::Cow;
use tower_grpc::{self as grpc};
use tonic as grpc;
use tracing::trace;

#[derive(Clone, Debug)]
Expand Down

0 comments on commit 02906d5

Please sign in to comment.