locking

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoEnvVarsExist

func DoEnvVarsExist(envVars []string) bool

DoEnvVarsExist return true if any of env vars do exist, false otherwise

func GetLock

func GetLock() (locking.Lock, error)

Types

type NoOpLock

type NoOpLock struct {
}

func (*NoOpLock) GetLock

func (noOpLock *NoOpLock) GetLock(resource string) (*int, error)

func (*NoOpLock) Lock

func (noOpLock *NoOpLock) Lock(transactionId int, resource string) (bool, error)

func (*NoOpLock) Unlock

func (noOpLock *NoOpLock) Unlock(resource string) (bool, error)

type PullRequestLock

type PullRequestLock struct {
	InternalLock     locking.Lock
	CIService        orchestrator.PullRequestService
	Reporter         reporting.Reporter
	ProjectName      string
	ProjectNamespace string
	PrNumber         int
}

func (*PullRequestLock) ForceUnlock

func (projectLock *PullRequestLock) ForceUnlock() error

func (*PullRequestLock) Lock

func (projectLock *PullRequestLock) Lock() (bool, error)

func (*PullRequestLock) LockId

func (projectLock *PullRequestLock) LockId() string

func (*PullRequestLock) Unlock

func (projectLock *PullRequestLock) Unlock() (bool, error)

Jump to

Keyboard shortcuts

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