lock

package
v3.3.4+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2017 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	LockTypeResourceConfigChecking = iota
	LockTypeBuildTracking
	LockTypePipelineScheduling
	LockTypeBatch
	LockTypeVolumeCreating
	LockTypeContainerCreating
)

Variables

View Source
var ErrLostLock = errors.New("lock was lost while held, possibly due to connection breakage")

Functions

This section is empty.

Types

type Lock

type Lock interface {
	Release() error
}

type LockDB

type LockDB interface {
	Acquire(id LockID) (bool, error)
	Release(id LockID) (bool, error)
}

type LockFactory

type LockFactory interface {
	Acquire(logger lager.Logger, ids LockID) (Lock, bool, error)
}

func NewLockFactory

func NewLockFactory(conn *sql.DB) LockFactory

func NewTestLockFactory

func NewTestLockFactory(db LockDB) LockFactory

type LockID

type LockID []int

func NewBuildTrackingLockID

func NewBuildTrackingLockID(buildID int) LockID

func NewContainerCreatingLockID

func NewContainerCreatingLockID(containerID int) LockID

func NewPipelineSchedulingLockLockID

func NewPipelineSchedulingLockLockID(pipelineID int) LockID

func NewResourceConfigCheckingLockID

func NewResourceConfigCheckingLockID(resourceConfigID int) LockID

func NewTaskLockID

func NewTaskLockID(taskName string) LockID

func NewVolumeCreatingLockID

func NewVolumeCreatingLockID(volumeID int) LockID

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL