aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2024-02-09 09:32:54 +0000
committerAlex <alex@adnab.me>2024-02-09 09:32:54 +0000
commite4a43bfd592c149af8e3eac58ab317a518f0968a (patch)
treecf34b848df170b3e3289754c77c4a9f61b97a260 /src/api/s3
parent8061bf5e1c250ff9234894f7a63910fedef1357b (diff)
parent5c63193d1de909cdecc501b482f5dc269a84874d (diff)
downloadgarage-e4a43bfd592c149af8e3eac58ab317a518f0968a.tar.gz
garage-e4a43bfd592c149af8e3eac58ab317a518f0968a.zip
Merge pull request 'Upgrade toml, kube, k8s-openapi + code fixes' (#709) from dep-upgrade-202402 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/709
Diffstat (limited to 'src/api/s3')
-rw-r--r--src/api/s3/api_server.rs6
-rw-r--r--src/api/s3/put.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/api/s3/api_server.rs b/src/api/s3/api_server.rs
index 495c5832..4b815f79 100644
--- a/src/api/s3/api_server.rs
+++ b/src/api/s3/api_server.rs
@@ -2,9 +2,9 @@ use std::sync::Arc;
use async_trait::async_trait;
-use futures::future::Future;
use hyper::header;
use hyper::{body::Incoming as IncomingBody, Request, Response};
+use tokio::sync::watch;
use opentelemetry::{trace::SpanRef, KeyValue};
@@ -51,10 +51,10 @@ impl S3ApiServer {
garage: Arc<Garage>,
addr: UnixOrTCPSocketAddress,
s3_region: String,
- shutdown_signal: impl Future<Output = ()>,
+ must_exit: watch::Receiver<bool>,
) -> Result<(), GarageError> {
ApiServer::new(s3_region, S3ApiServer { garage })
- .run_server(addr, None, shutdown_signal)
+ .run_server(addr, None, must_exit)
.await
}
diff --git a/src/api/s3/put.rs b/src/api/s3/put.rs
index 17424862..5ac5fb6b 100644
--- a/src/api/s3/put.rs
+++ b/src/api/s3/put.rs
@@ -7,7 +7,7 @@ use futures::try_join;
use md5::{digest::generic_array::*, Digest as Md5Digest, Md5};
use sha2::Sha256;
-use hyper::body::{Body, Bytes};
+use hyper::body::Bytes;
use hyper::header::{HeaderMap, HeaderValue};
use hyper::{Request, Response};