pub struct GcsConfig {
pub endpoint: String,
pub connect_timeout: Duration,
pub request_timeout: Duration,
pub idle_timeout: Duration,
pub min_throughput: u64,
pub max_retries: u32,
pub max_object_bytes: u64,
pub resumable_threshold: usize,
pub upload_chunk: usize,
}Expand description
Settings.
No timeout covers a whole transfer: a 300 MiB object over a slow link
takes as long as it takes. What is bounded is time without progress — a
response that does not start, a body that stops arriving, an upload chunk
that does not finish at a floor rate — so a dead connection fails in
about idle_timeout whatever the object’s size.
Fields§
§endpoint: StringAPI endpoint (https://storage.googleapis.com, or an emulator).
connect_timeout: DurationConnection establishment (TCP, TLS and any proxy CONNECT).
request_timeout: DurationA whole small request: metadata, listing pages, deletes, starting a
resumable session and asking it for its committed offset. Also the
wait for a download’s response headers, and the fixed part of an
upload’s bound (see min_throughput).
idle_timeout: DurationThe longest a download may receive no bytes before the attempt fails (and resumes from where it stopped).
min_throughput: u64The slowest upload rate tolerated, in bytes per second: one upload
request of n bytes (a chunk, or a whole small object) fails after
request_timeout + n / min_throughput. Must not be zero.
max_retries: u32Retries after the first attempt for transient failures; for a resumable transfer, consecutive attempts that make no progress.
max_object_bytes: u64Largest body accepted from a read, across every resumed attempt.
resumable_threshold: usizeBodies at or above this size use a resumable upload session.
upload_chunk: usizeBytes per PUT of a resumable upload: a non-zero multiple of 256 KiB.
Smaller chunks lose less to a failure and cost a round trip each.