From 7d29be87b9c02d937cb2a9a4eecddc0690cd2b59 Mon Sep 17 00:00:00 2001 From: Maksim Ryndin Date: Thu, 8 Feb 2024 14:15:09 +0000 Subject: [PATCH] 0.1.2 --- .github/ISSUE_TEMPLATE/BUG_REPORT.yaml | 1 + Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 8 ++++---- src/services/kv/mod.rs | 2 +- src/services/metrics/configuration.rs | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yaml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yaml index e32220b..b77da75 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yaml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yaml @@ -80,5 +80,6 @@ body: label: Which version of Goral do you run (`goral --version`)? multiple: false options: + - 0.1.2 - 0.1.1 - 0.1.0 diff --git a/Cargo.lock b/Cargo.lock index 84c8c35..8b3bbc9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -660,7 +660,7 @@ dependencies = [ [[package]] name = "goral" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 5ffa23e..d5c543b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "goral" -version = "0.1.1" +version = "0.1.2" edition = "2021" author = "Maksim Ryndin" license = "Apache-2.0" diff --git a/README.md b/README.md index 9a2a843..41fe4de 100644 --- a/README.md +++ b/README.md @@ -50,15 +50,15 @@ You can install Goral For example, for Linux ```sh -wget https://github.com/maksimryndin/goral/releases/download/0.1.1/goral-0.1.1-x86_64-unknown-linux-gnu.tar.gz -tar -xzf goral-0.1.1-x86_64-unknown-linux-gnu.tar.gz -sudo mv goral-0.1.1-x86_64-unknown-linux-gnu/goral /usr/local/bin/goral +wget https://github.com/maksimryndin/goral/releases/download/0.1.2/goral-0.1.2-x86_64-unknown-linux-gnu.tar.gz +tar -xzf goral-0.1.2-x86_64-unknown-linux-gnu.tar.gz +sudo mv goral-0.1.2-x86_64-unknown-linux-gnu/goral /usr/local/bin/goral rm -rf goral* ``` 2) from source (you need [Rust](https://www.rust-lang.org/tools/install)) with a command ```sh -git clone --depth 1 --branch 0.1.1 https://github.com/maksimryndin/goral +git clone --depth 1 --branch 0.1.2 https://github.com/maksimryndin/goral cd goral RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target ``` diff --git a/src/services/kv/mod.rs b/src/services/kv/mod.rs index 12611cf..2196189 100644 --- a/src/services/kv/mod.rs +++ b/src/services/kv/mod.rs @@ -29,7 +29,7 @@ use tokio::task::JoinHandle; pub const KV_SERVICE_NAME: &str = "kv"; -fn unique_keys(data: &Vec<(String, Value)>) -> Result<(), serde_valid::validation::Error> { +fn unique_keys(data: &[(String, Value)]) -> Result<(), serde_valid::validation::Error> { let keys: HashSet<&String> = data.iter().map(|(k, _)| k).collect(); if keys.len() < data.len() { Err(serde_valid::validation::Error::Custom( diff --git a/src/services/metrics/configuration.rs b/src/services/metrics/configuration.rs index 2fc01ed..2a224dc 100644 --- a/src/services/metrics/configuration.rs +++ b/src/services/metrics/configuration.rs @@ -8,7 +8,7 @@ use serde_valid::Validate; use url::Url; pub(super) fn scrape_push_rule( - endpoints: &Vec, + endpoints: &[Target], push_interval_secs: &u16, scrape_interval_secs: &u16, scrape_timeout_ms: &u32,