lib

package
v0.0.0-...-35d8de9 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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.

View Source
const DrainFileName = "mmutex.drain"

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

View Source
const LockFileEnvVariable = "MMUTEX_LOCK_DIR"

LockFileEnvVariable specifies the directory of the lock file.

View Source
const LockFileName = "mmutex.lock"

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

Variables

This section is empty.

Functions

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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