Documentation ¶
Overview ¶
filelock provides a machine wide file lock.
Index ¶
Constants ¶
View Source
const (
// NameRegexp specifies the regular expression used to identify valid lock names.
NameRegexp = "^[a-z]+[a-z0-9.-]*$"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock represents a machine wide file lock.
func NewLock ¶
NewLock returns a new lock with the given name, using the given lock directory, without acquiring it. The lock name must match the regular expression defined by NameRegexp.
Click to show internal directories.
Click to hide internal directories.