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 RemoveDrainFile ¶
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.