Merge pull request 'k2v-client: misc fixes' (#1463) from k2v-client-clonable into main-v2

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1463
This commit is contained in:
Alex
2026-06-30 21:02:44 +00:00
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ percent-encoding.workspace = true
hyper = { workspace = true, default-features = false, features = ["http1", "http2"] }
hyper-util.workspace = true
hyper-rustls.workspace = true
serde.workspace = true
serde = { workspace = true, default-features = false, features = ["derive", "std"] }
serde_json.workspace = true
thiserror.workspace = true
tokio.workspace = true
+6
View File
@@ -26,6 +26,10 @@ mod error;
pub use error::Error;
// Re-export these crates: values from these are passed to K2vClient::new_with_client
pub use hyper_rustls;
pub use hyper_util;
pub type Body = FullBody<Bytes>;
const DEFAULT_TIMEOUT: Duration = Duration::from_secs(5);
@@ -46,6 +50,7 @@ const PATH_ENCODE_SET: AsciiSet = NON_ALPHANUMERIC
.remove(b'.')
.remove(b'~');
#[derive(Debug, Clone)]
pub struct K2vClientConfig {
pub endpoint: String,
pub region: String,
@@ -56,6 +61,7 @@ pub struct K2vClientConfig {
}
/// Client used to query a K2V server.
#[derive(Debug, Clone)]
pub struct K2vClient {
config: K2vClientConfig,
user_agent: HeaderValue,