aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/admin/cluster.rs4
-rw-r--r--src/garage/admin.rs4
-rw-r--r--src/garage/cli/structs.rs2
-rw-r--r--src/garage/main.rs6
-rw-r--r--src/model/Cargo.toml2
-rw-r--r--src/model/lib.rs1
-rw-r--r--src/util/Cargo.toml3
-rw-r--r--src/util/lib.rs1
-rw-r--r--src/util/version.rs (renamed from src/model/version.rs)0
9 files changed, 12 insertions, 11 deletions
diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs
index 010382f2..99c6e332 100644
--- a/src/api/admin/cluster.rs
+++ b/src/api/admin/cluster.rs
@@ -18,8 +18,8 @@ use crate::helpers::{json_ok_response, parse_json_body};
pub async fn handle_get_cluster_status(garage: &Arc<Garage>) -> Result<Response<Body>, Error> {
let res = GetClusterStatusResponse {
node: hex::encode(garage.system.id),
- garage_version: garage_model::version::garage_version(),
- garage_features: garage_model::version::garage_features(),
+ garage_version: garage_util::version::garage_version(),
+ garage_features: garage_util::version::garage_features(),
db_engine: garage.db.engine(),
known_nodes: garage
.system
diff --git a/src/garage/admin.rs b/src/garage/admin.rs
index 9c4ecd9d..b4d2d1a1 100644
--- a/src/garage/admin.rs
+++ b/src/garage/admin.rs
@@ -742,8 +742,8 @@ impl AdminRpcHandler {
writeln!(
&mut ret,
"\nGarage version: {} [features: {}]",
- garage_model::version::garage_version(),
- garage_model::version::garage_features()
+ garage_util::version::garage_version(),
+ garage_util::version::garage_features()
.map(|list| list.join(", "))
.unwrap_or_else(|| "(unknown)".into()),
)
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs
index 825fe859..06548e89 100644
--- a/src/garage/cli/structs.rs
+++ b/src/garage/cli/structs.rs
@@ -1,7 +1,7 @@
use serde::{Deserialize, Serialize};
use structopt::StructOpt;
-use garage_model::version::garage_version;
+use garage_util::version::garage_version;
#[derive(StructOpt, Debug)]
pub enum Command {
diff --git a/src/garage/main.rs b/src/garage/main.rs
index 1a4a939a..77d5db24 100644
--- a/src/garage/main.rs
+++ b/src/garage/main.rs
@@ -99,14 +99,14 @@ async fn main() {
"system-libs",
][..];
if let Some(git_version) = option_env!("GIT_VERSION") {
- garage_model::version::init_version(git_version);
+ garage_util::version::init_version(git_version);
}
- garage_model::version::init_features(features);
+ garage_util::version::init_features(features);
// Parse arguments
let version = format!(
"{} [features: {}]",
- garage_model::version::garage_version(),
+ garage_util::version::garage_version(),
features.join(", ")
);
let opt = Opt::from_clap(&Opt::clap().version(version.as_str()).get_matches());
diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml
index 101c97d3..bbcfe89c 100644
--- a/src/model/Cargo.toml
+++ b/src/model/Cargo.toml
@@ -24,9 +24,7 @@ async-trait = "0.1.7"
arc-swap = "1.0"
blake2 = "0.9"
err-derive = "0.3"
-git-version = "0.3.4"
hex = "0.4"
-lazy_static = "1.4"
base64 = "0.13"
tracing = "0.1.30"
rand = "0.8"
diff --git a/src/model/lib.rs b/src/model/lib.rs
index 43db01c5..4f20ea46 100644
--- a/src/model/lib.rs
+++ b/src/model/lib.rs
@@ -19,4 +19,3 @@ pub mod s3;
pub mod garage;
pub mod helper;
pub mod migrate;
-pub mod version;
diff --git a/src/util/Cargo.toml b/src/util/Cargo.toml
index af57008e..163c1b77 100644
--- a/src/util/Cargo.toml
+++ b/src/util/Cargo.toml
@@ -16,11 +16,14 @@ path = "lib.rs"
[dependencies]
garage_db = { version = "0.8.0", path = "../db" }
+arc-swap = "1.0"
async-trait = "0.1"
blake2 = "0.9"
err-derive = "0.3"
+git-version = "0.3.4"
xxhash-rust = { version = "0.8", default-features = false, features = ["xxh3"] }
hex = "0.4"
+lazy_static = "1.4"
tracing = "0.1.30"
rand = "0.8"
sha2 = "0.9"
diff --git a/src/util/lib.rs b/src/util/lib.rs
index fce151af..47c85c3a 100644
--- a/src/util/lib.rs
+++ b/src/util/lib.rs
@@ -14,3 +14,4 @@ pub mod persister;
pub mod time;
pub mod token_bucket;
pub mod tranquilizer;
+pub mod version;
diff --git a/src/model/version.rs b/src/util/version.rs
index b515dccc..b515dccc 100644
--- a/src/model/version.rs
+++ b/src/util/version.rs