From 8e989a74810712e68ea756b2b04b6170a14ba52c Mon Sep 17 00:00:00 2001 From: Emmanuel Bosquet Date: Thu, 23 Nov 2023 17:02:02 +0100 Subject: [PATCH] switch to protobuf channel update rust-toolchain and rust version to 1.74.0 --- Cargo.toml | 4 +++- rust-toolchain | 2 +- src/channel.rs | 6 +++--- src/lib.rs | 3 +-- src/unpooled.rs | 3 +-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dabbef1..4da9dfb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,9 @@ bb8 = "^0.8.1" config = "^0.13.4" mio = { version = "^0.8.10", default-features = false, features = ["os-poll", "os-ext", "net"] } serde_json = "^1.0.111" -sozu-command-lib = "^0.15.19" +# TODO: replace this with the sozu version release that will have protobuf in channels +# sozu-command-lib = "^0.15.19" +sozu-command-lib = { path = "../sozu/command" } tempdir = "^0.3.7" thiserror = "^1.0.56" tokio = { version = "^1.35.1", features = ["time", "fs", "io-util"] } diff --git a/rust-toolchain b/rust-toolchain index 832e9af..dc87e8a 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.70.0 +1.74.0 diff --git a/src/channel.rs b/src/channel.rs index 700b360..3363680 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -35,8 +35,8 @@ pub enum Error { #[derive(PartialEq, Eq, Clone, Debug)] pub struct ConnectionProperties { pub socket: PathBuf, - pub buffer_size: usize, - pub max_buffer_size: usize, + pub buffer_size: u64, + pub max_buffer_size: u64, } impl From<&Config> for ConnectionProperties { @@ -63,7 +63,7 @@ impl TryFrom<&PathBuf> for ConnectionProperties { impl ConnectionProperties { #[tracing::instrument] - fn new(socket: PathBuf, buffer_size: usize, max_buffer_size: usize) -> Self { + fn new(socket: PathBuf, buffer_size: u64, max_buffer_size: u64) -> Self { Self { socket, buffer_size, diff --git a/src/lib.rs b/src/lib.rs index 886f625..895d4e4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,8 +6,7 @@ use bb8::Pool; use sozu_command_lib::{ channel::ChannelError, - proto::command::{request::RequestType, Request, Response, ResponseStatus}, - request::WorkerRequest, + proto::command::{request::RequestType, Request, Response, ResponseStatus, WorkerRequest}, }; use tempdir::TempDir; use tokio::{ diff --git a/src/unpooled.rs b/src/unpooled.rs index 0fcd13b..40a996f 100644 --- a/src/unpooled.rs +++ b/src/unpooled.rs @@ -5,8 +5,7 @@ use sozu_command_lib::{ channel::{Channel, ChannelError}, - proto::command::{request::RequestType, Request, Response, ResponseStatus}, - request::WorkerRequest, + proto::command::{request::RequestType, Request, Response, ResponseStatus, WorkerRequest}, }; use tempdir::TempDir; use tokio::{