Discover Packages
github.com/freakmaxi/locking-center-client-go
module
Version:
v0.2.1
Opens a new window with list of versions in this module.
Published: Mar 21, 2021
License: GPL-3.0
Opens a new window with license information.
README
README
¶
Locking-Center Go Client
The Go Connector of Locking-Center that is a mutex point to synchronize access between different services. You can limit the
execution between services and create queueing for the operation.
Installation
go get github.com/freakmaxi/locking-center-client-go/mutex
Usage
package main
import (
"fmt"
"github.com/freakmaxi/locking-center-client-go/mutex"
)
func main() {
m, err := mutex.NewLockingCenter("localhost:22119")
if err != nil {
panic(err)
}
m.Lock("locking-key")
fmt.Println("Hello from locked area!")
m.Unlock("locking-key")
}
Expand ▾
Collapse ▴
Directories
¶
Click to show internal directories.
Click to hide internal directories.