From b790aa90956148c308ed79657c91f62b32f72d6a Mon Sep 17 00:00:00 2001 From: milinddethe15 Date: Wed, 6 Nov 2024 20:07:26 +0530 Subject: [PATCH] Added `MaxHedgedRequests` field to support hedged requests Signed-off-by: milinddethe15 --- exthttp/transport.go | 1 + providers/oci/oci.go | 1 + providers/oss/oss.go | 9 +++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/exthttp/transport.go b/exthttp/transport.go index 92f86a11..2fbfdf1a 100644 --- a/exthttp/transport.go +++ b/exthttp/transport.go @@ -38,6 +38,7 @@ type HTTPConfig struct { TLSConfig TLSConfig `yaml:"tls_config"` DisableCompression bool `yaml:"disable_compression"` + MaxHedgedRequests uint `yaml:"max_hedged_requests"` } // DefaultTransport - this default transport is based on the Minio diff --git a/providers/oci/oci.go b/providers/oci/oci.go index 062da7c1..770dc423 100644 --- a/providers/oci/oci.go +++ b/providers/oci/oci.go @@ -67,6 +67,7 @@ type HTTPConfig struct { DisableCompression bool `yaml:"disable_compression"` ClientTimeout time.Duration `yaml:"client_timeout"` Transport http.RoundTripper `yaml:"-"` + MaxHedgedRequests uint `yaml:"max_hedged_requests"` } // Config stores the configuration for oci bucket. diff --git a/providers/oss/oss.go b/providers/oss/oss.go index aee8c623..2e66f741 100644 --- a/providers/oss/oss.go +++ b/providers/oss/oss.go @@ -32,10 +32,11 @@ const PartSize = 1024 * 1024 * 128 // Config stores the configuration for oss bucket. type Config struct { - Endpoint string `yaml:"endpoint"` - Bucket string `yaml:"bucket"` - AccessKeyID string `yaml:"access_key_id"` - AccessKeySecret string `yaml:"access_key_secret"` + Endpoint string `yaml:"endpoint"` + Bucket string `yaml:"bucket"` + AccessKeyID string `yaml:"access_key_id"` + AccessKeySecret string `yaml:"access_key_secret"` + MaxHedgedRequests uint `yaml:"max_hedged_requests"` } // Bucket implements the store.Bucket interface.