pub struct Config { /* private fields */ }
Expand description
Holds configuration information for the library.
Implementations§
source§impl Config
impl Config
sourcepub fn global() -> &'static Config
pub fn global() -> &'static Config
Fetches the global config object, values are either defaulted or populated from the environment:
ESTHRI_STORAGE_CLASS
- Config::storage_class()ESTHRI_UPLOAD_PART_SIZE
- Config::upload_part_size()ESTHRI_UPLOAD_READ_SIZE
- Config::upload_read_size()ESTHRI_CONCURRENT_UPLOAD_TASKS
- Config::concurrent_upload_tasks()ESTHRI_CONCURRENT_DOWNLOADER_TASKS
- Config::concurrent_downloader_tasks()ESTHRI_CONCURRENT_SYNC_TASKS
- Config::concurrent_sync_tasks()ESTHRI_REQUEST_RETRIES
- Config::request_retries()ESTHRI_CONCURRENT_WRITER_TASKS
- [Config::concurrent_writer_tasks(
sourcepub fn storage_class(&self) -> S3StorageClass
pub fn storage_class(&self) -> S3StorageClass
The default storage class for put requests to S3. STANDARD is the default storage class unless specified. View AWS documentation for more specifications on other storage classes. Defaults to [STORAGE_CLASS].
sourcepub fn temp_dir_path(&self) -> Option<PathBuf>
pub fn temp_dir_path(&self) -> Option<PathBuf>
The default path for new temp files. Uses to current directory if unset. Defaults to [TEMP_DIR_PATH].
sourcepub fn upload_part_size(&self) -> u64
pub fn upload_part_size(&self) -> u64
The default size of parts in a multipart upload to S3. 8 MiB is the default chunk size from awscli, changing this size will affect the calculation of ETags. Defaults to [UPLOAD_PART_SIZE].
sourcepub fn upload_read_size(&self) -> u64
pub fn upload_read_size(&self) -> u64
The amount of data to read at a time from files being uploaded. This is set separately to [UPLOAD_PART_SIZE] to lower memory usage, as having lots of 8MiB chunks in flight can cause high memory usage. Defaults to [UPLOAD_READ_SIZE].
sourcepub fn concurrent_upload_tasks(&self) -> usize
pub fn concurrent_upload_tasks(&self) -> usize
The number of concurrent tasks run when sending data to S3. Defaults to [CONCURRENT_UPLOAD_TASKS].
sourcepub fn concurrent_downloader_tasks(&self) -> usize
pub fn concurrent_downloader_tasks(&self) -> usize
The number of concurrent tasks run when receiving data from S3. Each task represents a connection to S3. Defaults to [CONCURRENT_DOWNLOADER_TASKS].
sourcepub fn concurrent_sync_tasks(&self) -> usize
pub fn concurrent_sync_tasks(&self) -> usize
The number of concurrent tasks run when running a sync operation. Defaults to [CONCURRENT_SYNC_TASKS].
sourcepub fn request_retries(&self) -> usize
pub fn request_retries(&self) -> usize
The number of times to retry a request before giving up. Defaults to [REQUEST_RETRIES].
sourcepub fn concurrent_writer_tasks(&self) -> usize
pub fn concurrent_writer_tasks(&self) -> usize
The number of concurrent tasks run when writing download data to disk. Defaults to [CONCURRENT_WRITER_TASKS].