Skip to content

Commit

Permalink
feat: migrate server to actix-http
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed May 27, 2024
1 parent 85a077e commit 391ea84
Show file tree
Hide file tree
Showing 16 changed files with 328 additions and 220 deletions.
193 changes: 149 additions & 44 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ edition = "2021"
[dependencies]
badge = { path = "./libs/badge" }

actix-http = { version = "3", features = ["http2"] }
actix-server = "2"
actix-service = "2"
anyhow = "1"
cadence = "1"
crates-index = { version = "2", default-features = false, features = ["git"] }
derive_more = "0.99"
dotenvy = "0.15"
font-awesome-as-a-crate = "0.3"
futures-util = { version = "0.3", default-features = false, features = ["std"] }
hyper = { version = "0.14.10", features = ["full"] }
error_reporter = "1"
indexmap = { version = "2", features = ["serde"] }
lru_time_cache = "0.11"
Expand Down
4 changes: 2 additions & 2 deletions src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ use std::{
time::{Duration, Instant},
};

use actix_service::Service;
use anyhow::{anyhow, Error};
use cadence::{MetricSink, NopMetricSink, StatsdClient};
use futures_util::{
future::try_join_all,
stream::{self, BoxStream},
StreamExt as _,
};
use hyper::service::Service;
use once_cell::sync::Lazy;
use relative_path::{RelativePath, RelativePathBuf};
use rustsec::database::Database;
Expand Down Expand Up @@ -277,7 +277,7 @@ impl Engine {
) -> Result<String, Error> {
let manifest_path = path.join(RelativePath::new("Cargo.toml"));

let mut service = self.retrieve_file_at_path.clone();
let service = self.retrieve_file_at_path.clone();
service.call((repo_path.clone(), manifest_path)).await
}

Expand Down
Loading

0 comments on commit 391ea84

Please sign in to comment.