Registry / utility / juju-fslock

juju-fslock

JSON →
library0.0.0-20160525022230-4d5c94c67b4bgogounverified

Package fslock provides a cross-process mutex based on file locks.

go get github.com/juju/fslock
INSTALL
IMPORT
SIG · JUJU-FSLOCK
J
juju-fslock
utilitygov0.0.0-20160525022230-4d5c94c67b4b
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fslock
github.com/juju/fslock

Acquire a file-based lock

package main import ( "fmt" "github.com/juju/fslock" ) func main() { lock := fslock.New("/tmp/my.lock") err := lock.Lock() if err != nil { panic(err) } defer lock.Unlock() fmt.Println("Lock acquired") }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20160525022230-4d5c94c67b4blatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
juju-fslock — go get juju-fslock · libregistry