Skip to content

mmcdermo/dlock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dlock

Dlock is a distributed lock library written in Go. You can use it to coordinate access to resources between servers by ensuring only one server holds a particular lock at a given time.

Usage

To run a dlock server, you can use the following code:

dlock_server.RunServer("localhost", "8422")

Then to connect as a client and block until a lock is free, you can simply:

conn, err := dlock_client.Connect("localhost", "8422")
lock_name := "lock_test"
client_name := "Trillby"
b := dlock_client.AcquireLock(conn, lock_name, client_name)

About

Distributed Lock Library written in Go

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages