Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove useless dependencies #993

Merged
merged 4 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions bin/src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ use anyhow::{bail, Context};
use async_dup::Arc;
use async_io::Async;
use futures::{
channel::{mpsc::*, oneshot},
channel::{
mpsc::{channel, Receiver, Sender},
oneshot,
},
{SinkExt, StreamExt},
};
use futures_lite::{future, io::*};
use futures_lite::{
future,
io::{AsyncBufReadExt, AsyncWriteExt, BufReader},
};
use nix::{
sys::signal::{kill, Signal},
unistd::Pid,
Expand Down
2 changes: 1 addition & 1 deletion bin/src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use anyhow::{bail, Context};
use futures_lite::future;
use libc::{self, pid_t};
use mio::net::UnixStream;
use nix::unistd::*;
use nix::unistd::{fork, ForkResult};
use serde::{Deserialize, Serialize};

use tempfile::tempfile;
Expand Down
5 changes: 2 additions & 3 deletions command/src/proto/display.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use std::fmt::{Display, Formatter};

use crate::proto::command::TlsVersion;

use super::command::{
use crate::proto::command::{
request::RequestType, CertificateAndKey, CertificateSummary, QueryCertificatesFilters,
TlsVersion,
};

impl Display for CertificateAndKey {
Expand Down
1 change: 0 additions & 1 deletion e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition = "2021"

[dependencies]
futures = "^0.3.28"
futures-lite = "^1.13.0"
hyper = { version = "^0.14.27", features = ["client", "http1"] }
hyper-rustls = { version = "^0.24.1", default-features = false, features = ["webpki-tokio", "http1", "tls12", "logging"] }
libc = "^0.2.147"
Expand Down
5 changes: 4 additions & 1 deletion e2e/src/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ fn try_http_behaviors() -> State {
let mut backend = SyncBackend::new(
"backend",
back_address,
"HTTP/1.1 101 Switching Protocols\r\nConnection: Upgrade\r\nUpgrade: WebSocket\r\nTransfer-Encoding: Chunked\r\n\r\nearly",
"HTTP/1.1 101 Switching Protocols\r\nConnection: Upgrade\r\nUpgrade: WebSocket\r\nTransfer-Encoding: Chunked\r\n\r\n",
);

info!("expecting upgrade (101 switching protocols)");
Expand All @@ -832,6 +832,9 @@ fn try_http_behaviors() -> State {
println!("request: {request:?}");
println!("response: {response:?}");
assert!(response.starts_with(&expected_response_start));

backend.set_response("early");
backend.send(0);
let expected_response = String::from("early");
let response = client.receive();
assert_eq!(response, Some(expected_response));
Expand Down
9 changes: 1 addition & 8 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,42 +30,35 @@ include = [
[dependencies]
anyhow = "^1.0.72"
cookie-factory = "^0.3.2"
foreign-types-shared = "^0.3.1"
hdrhistogram = "^7.5.2"
hex = "^0.4.3"
hpack = "^0.3.0"
idna = "^0.4.0"
kawa = { version = "^0.6.3", default-features = false }
lazycell = "^1.3.0"
libc = "^0.2.147"
log = "^0.4.19"
memchr = "^2.5.0"
mio = { version = "^0.8.8", features = ["os-poll", "os-ext", "net"] }
nom = { version = "^7.1.3", default-features = true, features = ["std"] }
pool = "^0.1.4"
poule = "^0.3.2"
rand = "^0.8.5"
regex = "^1.9.3"
rustls = "^0.21.6"
rustls-pemfile = "^1.0.3"
rusty_ulid = "^2.0.0"
serial_test = "^2.0.0"
sha2 = "^0.10.7"
slab = "^0.4.8"
socket2 = { version = "^0.5.3", features = ["all"] }
thiserror = "^1.0.44"
time = "^0.3.25"
url = "^2.4.0"
webpki = "^0.22.0"
x509-parser = "^0.15.1"

sozu-command-lib = { path = "../command", version = "^0.15.3" }

[dev-dependencies]
quickcheck = "^1.0.3"
rand = "^0.8.5"
serial_test = "^2.0.0"
tiny_http = "^0.12.0"
ureq = "^2.7.1"

[features]
default = ["simd"]
Expand Down
5 changes: 2 additions & 3 deletions lib/src/backends.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
use std::{cell::RefCell, collections::HashMap, net::SocketAddr, rc::Rc};

use mio::net::TcpStream;
use time::Duration;

use sozu_command::{
proto::command::{Event, EventKind, LoadBalancingAlgorithms, LoadBalancingParams, LoadMetric},
state::ClusterId,
};
use time::Duration;

use crate::{
load_balancing::{LeastLoaded, LoadBalancingAlgorithm, PowerOfTwo, Random, RoundRobin},
retry::{self, RetryPolicy},
server::{self, push_event},
PeakEWMA,
};

use super::load_balancing::*;

#[derive(thiserror::Error, Debug)]
pub enum BackendError {
#[error("No backend found for cluster {0}")]
Expand Down
Loading
Loading