lockfile

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: Unlicense Imports: 6 Imported by: 1

Documentation

Overview

Package lockfile implements a lock to limit a binary to one process per anchor file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

type Lock string

Lock is lockfile to limit a binary to one process per anchor file.

func Create

func Create(anchorFile string) (Lock, error)

Create a lock for the given binary anchorFile. Returns an error if the lock already exists.

func (*Lock) Release

func (l *Lock) Release() error

Release the lock. The protected process should call this method during shutdown.

Jump to

Keyboard shortcuts

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