aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/api_server.rs7
-rw-r--r--src/block.rs1
-rw-r--r--src/block_ref_table.rs3
-rw-r--r--src/object_table.rs1
-rw-r--r--src/rpc_client.rs4
-rw-r--r--src/server.rs10
-rw-r--r--src/version_table.rs3
7 files changed, 18 insertions, 11 deletions
diff --git a/src/api_server.rs b/src/api_server.rs
index 14c58fc4..4070be6c 100644
--- a/src/api_server.rs
+++ b/src/api_server.rs
@@ -9,14 +9,15 @@ use hyper::server::conn::AddrStream;
use hyper::service::{make_service_fn, service_fn};
use hyper::{Body, Method, Request, Response, Server, StatusCode};
-use crate::block::INLINE_THRESHOLD;
-use crate::block_ref_table::*;
use crate::data::*;
use crate::error::Error;
use crate::http_util::*;
+use crate::table::EmptySortKey;
+
+use crate::block::INLINE_THRESHOLD;
+use crate::block_ref_table::*;
use crate::object_table::*;
use crate::server::Garage;
-use crate::table::EmptySortKey;
use crate::version_table::*;
type BodyType = Box<dyn HttpBody<Data = Bytes, Error = Error> + Send + Unpin>;
diff --git a/src/block.rs b/src/block.rs
index 60121ac5..d7daea01 100644
--- a/src/block.rs
+++ b/src/block.rs
@@ -16,6 +16,7 @@ use crate::error::Error;
use crate::membership::System;
use crate::rpc_client::*;
use crate::rpc_server::*;
+
use crate::server::Garage;
pub const INLINE_THRESHOLD: usize = 3072;
diff --git a/src/block_ref_table.rs b/src/block_ref_table.rs
index 5f6ce21b..17efa155 100644
--- a/src/block_ref_table.rs
+++ b/src/block_ref_table.rs
@@ -3,10 +3,11 @@ use serde::{Deserialize, Serialize};
use std::sync::Arc;
use crate::background::*;
-use crate::block::*;
use crate::data::*;
use crate::table::*;
+use crate::block::*;
+
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
pub struct BlockRef {
// Primary key
diff --git a/src/object_table.rs b/src/object_table.rs
index a55af7db..82a64cd1 100644
--- a/src/object_table.rs
+++ b/src/object_table.rs
@@ -5,6 +5,7 @@ use std::sync::Arc;
use crate::background::BackgroundRunner;
use crate::data::*;
use crate::table::*;
+
use crate::version_table::*;
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
diff --git a/src/rpc_client.rs b/src/rpc_client.rs
index 6d26d86a..95288269 100644
--- a/src/rpc_client.rs
+++ b/src/rpc_client.rs
@@ -12,12 +12,12 @@ use hyper::client::{Client, HttpConnector};
use hyper::{Body, Method, Request, StatusCode};
use tokio::sync::watch;
-use crate::background::*;
+use crate::background::BackgroundRunner;
use crate::data::*;
use crate::error::Error;
use crate::membership::Status;
use crate::rpc_server::RpcMessage;
-use crate::server::*;
+use crate::server::TlsConfig;
use crate::tls_util;
pub struct RpcClient<M: RpcMessage> {
diff --git a/src/server.rs b/src/server.rs
index 099e087e..e728c667 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -8,18 +8,20 @@ pub use futures_util::future::FutureExt;
use serde::Deserialize;
use tokio::sync::watch;
-use crate::api_server;
use crate::background::*;
-use crate::block::*;
-use crate::block_ref_table::*;
use crate::data::*;
use crate::error::Error;
use crate::membership::System;
-use crate::object_table::*;
use crate::rpc_server::RpcServer;
use crate::table::*;
+
+use crate::block::*;
+use crate::block_ref_table::*;
+use crate::object_table::*;
use crate::version_table::*;
+use crate::api_server;
+
pub const DEFAULT_TIMEOUT: Duration = Duration::from_secs(10);
#[derive(Deserialize, Debug, Clone)]
diff --git a/src/version_table.rs b/src/version_table.rs
index 62d6a702..7e7623fc 100644
--- a/src/version_table.rs
+++ b/src/version_table.rs
@@ -3,10 +3,11 @@ use serde::{Deserialize, Serialize};
use std::sync::Arc;
use crate::background::BackgroundRunner;
-use crate::block_ref_table::*;
use crate::data::*;
use crate::table::*;
+use crate::block_ref_table::*;
+
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
pub struct Version {
// Primary key