Skip to content

Commit

Permalink
switch to protobuf channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj committed Nov 23, 2023
1 parent 62e4ed2 commit 24cf800
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ bb8 = "^0.8.1"
config = "^0.13.3"
mio = { version = "^0.8.9", default-features = false, features = ["os-poll", "os-ext", "net"] }
serde_json = "^1.0.108"
sozu-command-lib = "^0.15.15"
# TODO: replace this with the sozu version release that will have protobuf in channels
# sozu-command-lib = "^0.15.15"
sozu-command-lib = { path = "../sozu/command" }
tempdir = "^0.3.7"
thiserror = "^1.0.50"
tokio = { version = "^1.34.0", features = ["time", "fs", "io-util"] }
Expand Down
6 changes: 3 additions & 3 deletions src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down

0 comments on commit 24cf800

Please sign in to comment.