public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox 3/3] s3-client: expose default timeout for s3 api requests
Date: Wed, 20 Aug 2025 11:58:05 +0200	[thread overview]
Message-ID: <20250820095807.172722-4-c.ebner@proxmox.com> (raw)
In-Reply-To: <20250820095807.172722-1-c.ebner@proxmox.com>

Make the default timeout public, so it can be reused for put object
requests in Proxmox Backup Server.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 proxmox-s3-client/src/client.rs | 4 +++-
 proxmox-s3-client/src/lib.rs    | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/proxmox-s3-client/src/client.rs b/proxmox-s3-client/src/client.rs
index 8a551f3a..871cd3fa 100644
--- a/proxmox-s3-client/src/client.rs
+++ b/proxmox-s3-client/src/client.rs
@@ -31,8 +31,10 @@ use crate::response_reader::{
     ListBucketsResponse, ListObjectsV2Response, PutObjectResponse, ResponseReader,
 };
 
+/// Default timeout for s3 api requests.
+pub const S3_HTTP_REQUEST_TIMEOUT: Duration = Duration::from_secs(60);
+
 const S3_HTTP_CONNECT_TIMEOUT: Duration = Duration::from_secs(10);
-const S3_HTTP_REQUEST_TIMEOUT: Duration = Duration::from_secs(60);
 const S3_TCP_KEEPALIVE_TIME: u32 = 120;
 const MAX_S3_UPLOAD_RETRY: usize = 3;
 // Assumed minimum upload rate of 1 KiB/s for dynamic put object request timeout calculation.
diff --git a/proxmox-s3-client/src/lib.rs b/proxmox-s3-client/src/lib.rs
index f485ac46..26e7032b 100644
--- a/proxmox-s3-client/src/lib.rs
+++ b/proxmox-s3-client/src/lib.rs
@@ -20,7 +20,7 @@ pub use aws_sign_v4::uri_decode;
 #[cfg(feature = "impl")]
 mod client;
 #[cfg(feature = "impl")]
-pub use client::{S3Client, S3ClientOptions, S3PathPrefix};
+pub use client::{S3Client, S3ClientOptions, S3PathPrefix, S3_HTTP_REQUEST_TIMEOUT};
 #[cfg(feature = "impl")]
 mod timestamps;
 #[cfg(feature = "impl")]
-- 
2.47.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  parent reply	other threads:[~2025-08-20  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20  9:58 [pbs-devel] [PATCH proxmox{, -backup} 0/5] dynamically calculate request timeout for put object calls Christian Ebner
2025-08-20  9:58 ` [pbs-devel] [PATCH proxmox 1/3] s3-client: allow setting custom timeout when sending requests Christian Ebner
2025-08-20  9:58 ` [pbs-devel] [PATCH proxmox 2/3] s3-client: dynamically calculate put request timeout based on payload Christian Ebner
2025-08-20  9:58 ` Christian Ebner [this message]
2025-08-20  9:58 ` [pbs-devel] [PATCH proxmox-backup 1/2] s3: pass now optional default request timeout for s3 api calls Christian Ebner
2025-08-20  9:58 ` [pbs-devel] [PATCH proxmox-backup 2/2] api: format error to show full context for failed chunk uploads Christian Ebner
2025-08-25  9:35 ` [pbs-devel] applied-series: [PATCH proxmox{, -backup} 0/5] dynamically calculate request timeout for put object calls Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250820095807.172722-4-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal