pub struct CloudProviderConfig {
pub provider: CloudProvider,
pub bucket: String,
pub prefix: String,
pub region: Option<CloudRegion>,
pub endpoint: Option<String>,
pub priority: u32,
pub weight: u32,
pub max_concurrent: usize,
pub timeout: Duration,
pub read_only: bool,
pub custom_egress_cost: Option<f64>,
pub options: HashMap<String, String>,
}Expand description
Configuration for a single cloud provider
Fields§
§provider: CloudProviderProvider type
bucket: StringBucket or container name
prefix: StringOptional prefix within bucket
region: Option<CloudRegion>Region
endpoint: Option<String>Endpoint URL (for custom endpoints)
priority: u32Priority (lower is higher priority)
weight: u32Weight for load balancing (0-100)
max_concurrent: usizeMaximum concurrent requests
timeout: DurationRequest timeout
read_only: boolIs this provider read-only
custom_egress_cost: Option<f64>Custom cost per GB egress (overrides default)
options: HashMap<String, String>Provider-specific options
Implementations§
Source§impl CloudProviderConfig
impl CloudProviderConfig
Sourcepub fn azure(container: impl Into<String>) -> Self
pub fn azure(container: impl Into<String>) -> Self
Creates an Azure Blob provider configuration
Sourcepub fn with_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_prefix(self, prefix: impl Into<String>) -> Self
Sets the prefix within the bucket
Sourcepub fn with_region(self, region: CloudRegion) -> Self
pub fn with_region(self, region: CloudRegion) -> Self
Sets the region
Sourcepub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
Sets a custom endpoint
Sourcepub fn with_priority(self, priority: u32) -> Self
pub fn with_priority(self, priority: u32) -> Self
Sets the priority (lower is higher)
Sourcepub fn with_weight(self, weight: u32) -> Self
pub fn with_weight(self, weight: u32) -> Self
Sets the weight for load balancing
Sourcepub fn with_read_only(self, read_only: bool) -> Self
pub fn with_read_only(self, read_only: bool) -> Self
Sets whether this provider is read-only
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Sets the request timeout
Sourcepub fn with_egress_cost(self, cost: f64) -> Self
pub fn with_egress_cost(self, cost: f64) -> Self
Sets custom egress cost per GB
Sourcepub fn with_option(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_option( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Adds a custom option
Sourcepub fn effective_egress_cost(&self) -> f64
pub fn effective_egress_cost(&self) -> f64
Gets the effective egress cost
Trait Implementations§
Source§impl Clone for CloudProviderConfig
impl Clone for CloudProviderConfig
Source§fn clone(&self) -> CloudProviderConfig
fn clone(&self) -> CloudProviderConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CloudProviderConfig
impl RefUnwindSafe for CloudProviderConfig
impl Send for CloudProviderConfig
impl Sync for CloudProviderConfig
impl Unpin for CloudProviderConfig
impl UnsafeUnpin for CloudProviderConfig
impl UnwindSafe for CloudProviderConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.