Back to godoc.org

Package lib

v0.0.0-...-1557bcf
Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

Index

Constants

const DefaultCommandTimeout = 2 * time.Hour

DefaultCommandTimeout is the total amount of time, including lock acquisition and command runtime, allotted to running a command through mmutex.

const DrainFileName = "mmutex.drain"

DrainFileName specifies the name of the drain file within $MMUTEX_LOCK_DIR.

const LockFileEnvVariable = "MMUTEX_LOCK_DIR"

LockFileEnvVariable specifies the directory of the lock file.

const LockFileName = "mmutex.lock"

LockFileName specifies the name of the lock file within $MMUTEX_LOCK_DIR.

func RemoveDrainFile

func RemoveDrainFile(ctx context.Context, drainFilePath string)

func RunExclusive

func RunExclusive(ctx context.Context, env subcommands.Env, command func(context.Context) error) error

RunExclusive runs the command with the specified context and environment while holding an exclusive mmutex lock.

func RunShared

func RunShared(ctx context.Context, env subcommands.Env, command func(context.Context) error) error

RunShared runs the command with the specified context and environment while holding a shared mmutex lock.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier