method

Store.LockUploadObjects

func (backend *Store) LockUploadObjects( ctx context.Context, objectKeys []string, ) (func(), error)

LockUploadObjects uses session advisory locks so object-store deletion and migration-owned adoption of an existing key cannot pass each other between database transactions or application processes.

Source adapters/postgres/upload_locks.go:40

@param ctx
The ctx value.
@param objectKeys
The objectKeys value.
@returns
The declared result.

Related types

  • Store

    A PostgreSQL implementation of Ridu’s document, snapshot, auth, preference, task, job, lock, upload-reference, and migration store contracts.