pub struct GcsConfig {Show 13 fields
pub bucket: String,
pub prefix: Option<String>,
pub service_account_path: Option<String>,
pub service_account_key: Option<String>,
pub application_credentials_path: Option<String>,
pub endpoint: Option<String>,
pub allow_http: bool,
pub multipart_threshold: u64,
pub multipart_chunk_size: usize,
pub max_retries: usize,
pub retry_timeout: Duration,
pub request_timeout: Duration,
pub connect_timeout: Duration,
}Expand description
Connection and bucket parameters for native Google Cloud Storage.
If every credential field is None, the config selects Workload Identity or
ADC through the metadata server. This is the keyless GKE production path.
Debug redacts the credential fields, so a stray {:?} call or tracing
call never leaks them.
Fields§
§bucket: StringGCS bucket name.
prefix: Option<String>Optional key prefix inside the bucket. No leading slash and no trailing slash.
service_account_path: Option<String>Optional path to a service-account JSON key file.
service_account_key: Option<String>Optional inline service-account JSON key. It is mutually exclusive with the path.
application_credentials_path: Option<String>Optional path to an application-default-credentials JSON file.
endpoint: Option<String>Optional custom GCS API base URL, for example http://fake-gcs:4443.
allow_http: boolAllow plaintext HTTP. Emulators without TLS require it.
multipart_threshold: u64Files of at least this size upload with resumable multipart. Defaults
to DEFAULT_MULTIPART_THRESHOLD.
multipart_chunk_size: usizePer-part size for multipart. Defaults to DEFAULT_MULTIPART_CHUNK_SIZE.
max_retries: usizeHow many times one request is retried before the error surfaces.
Defaults to DEFAULT_MAX_RETRIES; 0 disables retries.
retry_timeout: DurationCeiling on the wall-clock time one request may spend across all of its
retries. Defaults to DEFAULT_RETRY_TIMEOUT.
request_timeout: DurationCeiling on one HTTP request. Defaults to DEFAULT_REQUEST_TIMEOUT.
connect_timeout: DurationCeiling on the connect phase alone. Defaults to
DEFAULT_CONNECT_TIMEOUT.
Trait Implementations§
impl Eq for GcsConfig
impl StructuralPartialEq for GcsConfig
Auto Trait Implementations§
impl Freeze for GcsConfig
impl RefUnwindSafe for GcsConfig
impl Send for GcsConfig
impl Sync for GcsConfig
impl Unpin for GcsConfig
impl UnsafeUnpin for GcsConfig
impl UnwindSafe for GcsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more