freakmaxi / locking-center-client-go

The Go Connector of Locking-Center is a mutex point to synchronize access between different services. You can limit the execution between services and create queueing for the operation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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")
}

About

The Go Connector of Locking-Center is a mutex point to synchronize access between different services. You can limit the execution between services and create queueing for the operation.

License:GNU General Public License v3.0


Languages

Language:Go 100.0%