Versions in this module Expand all Collapse all v6 v6.4.2 Aug 17, 2020 Changes in this version + const LockTypeActiveTasks + const LockTypeBatch + const LockTypeBuildTracking + const LockTypeContainerCreating + const LockTypeDatabaseMigration + const LockTypeJobScheduling + const LockTypeResourceConfigChecking + const LockTypeResourceScanning + const LockTypeVolumeCreating + var ErrLostLock = errors.New("lock was lost while held, possibly due to connection breakage") + type Lock interface + Release func() error + type LockDB interface + Acquire func(id LockID) (bool, error) + Release func(id LockID) (bool, error) + type LockFactory interface + Acquire func(logger lager.Logger, ids LockID) (Lock, bool, error) + func NewLockFactory(conn *sql.DB, acquire LogFunc, release LogFunc) LockFactory + func NewTestLockFactory(db LockDB) LockFactory + type LockID []int + func NewActiveTasksLockID() LockID + func NewBuildTrackingLockID(buildID int) LockID + func NewDatabaseMigrationLockID() LockID + func NewJobSchedulingLockID(jobID int) LockID + func NewResourceConfigCheckingLockID(resourceConfigID int) LockID + func NewResourceScanningLockID() LockID + func NewTaskLockID(taskName string) LockID + func NewVolumeCreatingLockID(volumeID int) LockID + type LogFunc func(logger lager.Logger, id LockID)