Closed fcfangcc closed 4 months ago
containerd-client connect failed when toinc with tls feature(Other deps need. )
called `Result::unwrap()` on an `Err` value: tonic::transport::Error(Transport, hyper::Error(Connect, HttpsUriWithoutTlsSupport(())))
example
use containerd_client::{connect}; async fn test() { let channel = connect("/run/containerd/containerd.sock").await.unwrap(); } #[tokio::main] async fn main() { test().await; }
Failed Cargo.toml
[dependencies] tokio = { version = "1.37.0", features = ["full"] } tower = "0.4" tonic = { version = "0.11", default-features = false, features = ["default","transport", "codegen", "prost", "tls", "tls-roots", "gzip","tls-roots-common","tls-webpki-roots","channel"] } containerd-client = { version="0.5" }
Success Cargo.toml
[dependencies] tokio = { version = "1.37.0", features = ["full"] } tower = "0.4" tonic = { version = "0.11"} containerd-client = { version="0.5" }
We probably should tls feature with proper tonic dependencies to address this.
Do you want to make a PR?
containerd-client connect failed when toinc with tls feature(Other deps need. )
example
Failed Cargo.toml
Success Cargo.toml