Skip to content

Commit

Permalink
bump tonic,prost (#24)
Browse files Browse the repository at this point in the history
* bump versions

* bump tonic,prost
  • Loading branch information
aviramha authored Oct 4, 2024
1 parent bea821e commit 91e7792
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ documentation = "https://docs.rs/crate/k8s-cri"
readme = "README.md"

[dependencies]
tonic = { version = "0.11"}
prost = "0.12"
tonic = { version = "0.12"}
prost = "0.13"
serde = { version = "1.0", features = ["derive"] }

[build-dependencies.tonic-build]
version = "0.11"
version = "0.12"
default-features = false
features = ["prost", "transport"]

[dev-dependencies]
tokio = { version = "1.37", features = [ "rt-multi-thread", "macros" ] }
tower = "0.4"
hyper-util = "0.1.9"
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
fn main() {
tonic_build::configure()
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
.compile(&["proto/v1.proto"], &["proto/"])
.compile_protos(&["proto/v1.proto"], &["proto/"])
.unwrap();

tonic_build::configure()
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
.compile(&["proto/v1alpha2.proto"], &["proto/"])
.compile_protos(&["proto/v1alpha2.proto"], &["proto/"])
.unwrap();
}
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@
//!
//! use k8s_cri::v1alpha2::runtime_service_client::RuntimeServiceClient;
//! use tokio::net::UnixStream;
//! use hyper_util::rt::TokioIo;
//! use tonic::transport::{Channel, Endpoint, Uri};
//! use tower::service_fn;
//!
//! #[tokio::main]
//! async fn main() {
//! let path = "/run/containerd/containerd.sock";
//! let channel = Endpoint::try_from("http://[::]")
//! .unwrap()
//! .connect_with_connector(service_fn(move |_: Uri| UnixStream::connect(path)))
//! .connect_with_connector(service_fn(|_: Uri| async {
//! let path = "/run/containerd/containerd.sock";
//! Ok::<_, std::io::Error>(TokioIo::new(UnixStream::connect(path).await?))
//! }))
//! .await
//! .expect("Could not create client.");
//!
Expand Down

0 comments on commit 91e7792

Please sign in to comment.