[][src]Struct s3_algo::RequestConfig

pub struct RequestConfig {
    pub timeout_fraction: f64,
    pub backoff: f64,
    pub n_retries: usize,
    pub expected_upload_speed: f64,
    pub avg_power: f64,
    pub avg_min_bytes: u64,
    pub min_timeout: f64,
}

General parameters that control timeouts and retries

Fields

timeout_fraction: f64

Timeout is set to a fraction of expected upload time (> 1.0)

backoff: f64

Every retry, the timeout is multiplied by backoff (> 1.0)

n_retries: usize

Number of times to retry a single request before giving up

expected_upload_speed: f64

Expected upload speed in MBps (megabytes per second) - used as an initial estimate.

avg_power: f64

To estimate the upload speed incrementally, we use an exponential average: new_avg_speed = avg_power * new_speed + (1 - avg_power) * avg_speed.

Thus, between 0.0 and 1.0, closer to 1.0 means that newer data points have more significance.

avg_min_bytes: u64

Only results from uploads larger than avg_min_bytes are used to estimate upload speed. Uploads with size below this threshold get timeout set to min_timeout.

min_timeout: f64

The minimum timeout (seconds) (always added as an extra term to the total timeout)

Trait Implementations

impl Clone for RequestConfig[src]

impl Debug for RequestConfig[src]

impl Default for RequestConfig[src]

impl<'de> Deserialize<'de> for RequestConfig where
    RequestConfig: Default
[src]

impl Serialize for RequestConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.