Documentation ¶
Index ¶
- func AcquireLock(ctx context.Context, launcherFlags *flags.LauncherFlags)
- func AddApplicationSignature(sig *system.ProcessSignature)
- func AwaitApplicationsTerminated(ctx context.Context)
- func MinimizeApplicationSignaturesList() bool
- func ReleaseLock()
- func Restart(forwardLauncherLockOwnership bool, launcherFlags *flags.LauncherFlags)
- func RestartWithBinary(forwardLauncherLockOwnership bool, binaryPath string, ...)
- func WaitForProcessSignatureToStopRunning(ctx context.Context, procSig *system.ProcessSignature)
- type LockActionResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireLock ¶
func AcquireLock(ctx context.Context, launcherFlags *flags.LauncherFlags)
Blocks until the lock is available, claims it and restarts.
func AddApplicationSignature ¶
func AddApplicationSignature(sig *system.ProcessSignature)
Adds the supplied ProcessSignature to the execution lock file.
func AwaitApplicationsTerminated ¶
Waits for the processes from all previous executions to stop running and then removes the execution lock file.
func MinimizeApplicationSignaturesList ¶
func MinimizeApplicationSignaturesList() bool
MinimizeApplicationSignaturesList removes any process signatures no longer running from the execution lock file if it exists. If no process signature is running, the execution lock file is removed and the function returns true.
func Restart ¶
func Restart(forwardLauncherLockOwnership bool, launcherFlags *flags.LauncherFlags)
func RestartWithBinary ¶
func RestartWithBinary(forwardLauncherLockOwnership bool, binaryPath string, launcherFlags *flags.LauncherFlags)
Starts a new instance of the calling executable, writes the new process signature into the launcher signature file and quits the current instance.
func WaitForProcessSignatureToStopRunning ¶
func WaitForProcessSignatureToStopRunning(ctx context.Context, procSig *system.ProcessSignature)
Types ¶
type LockActionResult ¶
type LockActionResult int
const ( LockClaimed // The current process claimed the lock, and now owns it. LockOwned // The current process owns the lock already. )
Click to show internal directories.
Click to hide internal directories.