Skip to main content

create_object_client

Function create_object_client 

Source
pub async fn create_object_client(
    config: &ObjectConfig,
    rank: Option<usize>,
) -> Result<Arc<dyn ObjectBlockOps>>
Expand description

Create an object client from configuration.

Returns a trait object so consumers don’t need to depend on the s3 feature. The implementation is selected based on the configuration type.

§Arguments

  • config - Object storage configuration
  • rank - Optional worker rank for key prefixing (None for leader)

§Errors

Returns an error if the object client cannot be initialized or if the required feature is not enabled.