Skip to content

Commit

Permalink
chore(htiboxd): remove hitbox-backend dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
singulared committed Aug 20, 2023
1 parent 2b19b14 commit 0b2ab63
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
1 change: 0 additions & 1 deletion hitboxd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ hitbox = { path = "../../hitbox/hitbox", features = ["metrics"] }
hitbox-tower = { path = "../../hitbox/hitbox-tower" }
hitbox-http = { path = "../../hitbox/hitbox-http", version = "0.1" }
hitbox-redis = { path = "../../hitbox/hitbox-redis", version = "0.1" }
hitbox-backend = { path = "../../hitbox/hitbox-backend", version = "0.1" }
actix-router = "0.5"
hyper = { version = "0.14", features = ["full"] }
tokio = { version = "1", features = ["full"] }
Expand Down
4 changes: 1 addition & 3 deletions hitboxd/src/layer.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use std::collections::HashMap;
use std::{marker::PhantomData, sync::Arc};
use std::sync::Arc;

use hitbox::backend::CacheBackend;
use hitbox_redis::RedisBackend;
use tower::Layer;

use crate::CacheService;
Expand Down
10 changes: 5 additions & 5 deletions hitboxd/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use hitbox::{predicate::Predicate, Extractor};
use hitbox_http::{
extractors::{method::MethodExtractor, path::PathExtractor, NeutralExtractor},
predicates::{header::HeaderPredicate, query::QueryPredicate, NeutralRequestPredicate},
predicates::{
request::{HeaderPredicate, QueryPredicate},
NeutralRequestPredicate,
},
CacheableHttpRequest,
};
use hitbox_redis::RedisBackend;
// use hitbox_stretto::StrettoBackend;
use hitboxd::{
config::{BoxPredicate, Endpoint},
Cache,
};
use hitboxd::{config::Endpoint, Cache};
use http::Method;
use hyper::{Body, Server};
use std::{collections::HashMap, net::SocketAddr, sync::Arc};
Expand Down
5 changes: 1 addition & 4 deletions hitboxd/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ use actix_router::ResourceDef;
use hitbox::policy::PolicyConfig;
use hitbox::{backend::CacheBackend, fsm::CacheFuture};
use hitbox_http::{
predicates::{query::QueryPredicate, NeutralRequestPredicate, NeutralResponsePredicate},
CacheableHttpRequest, CacheableHttpResponse, FromBytes,
predicates::NeutralResponsePredicate, CacheableHttpRequest, CacheableHttpResponse, FromBytes,
};
use http::{Request, Response};
use hyper::body::{Body, HttpBody};
use tower::Service;

use tracing::log::warn;

use hitbox_tower::future::Transformer;

pub struct CacheService<S, B> {
Expand Down

0 comments on commit 0b2ab63

Please sign in to comment.