Skip to main content

create_lock_manager

Function create_lock_manager 

Source
pub async fn create_lock_manager(
    config: &ObjectConfig,
    instance_id: String,
) -> Result<Arc<dyn ObjectLockManager>>
Expand description

Create a lock manager from configuration.

Returns a trait object so consumers don’t need to depend on the s3 feature.

§Arguments

  • config - Object storage configuration
  • instance_id - Unique identifier for this instance (used in lock files)

§Errors

Returns an error if the lock manager cannot be initialized or if the required feature is not enabled.