method

Store.LockUploadObjects

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.

Arguments

ArgumentTypeDescription
ctxcontext.ContextThe ctx value.
objectKeys[]stringThe objectKeys value.

Returns

The declared result.

(func(), error)

Full signature

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

Source adapters/postgres/upload_locks.go:40

Related types

  • Store

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