dmutex

package
v0.0.0-...-64299d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DistributedMutexAcquisitionFailed = errors.New("DistributedMutexService: operation already in progress")
	DistributedMutexNoLeader          = errors.New("DistributedMutexService: unable to obtain lock-info")
)

Functions

func IsAcquisitionFailedError

func IsAcquisitionFailedError(err error) bool

Types

type DistributedMutexService

type DistributedMutexService struct {
	// contains filtered or unexported fields
}

func NewDistributedMutexService

func NewDistributedMutexService(zkServers []string, clientTimeout time.Duration, basePath string) *DistributedMutexService

func (*DistributedMutexService) Clean

func (service *DistributedMutexService) Clean() error

func (*DistributedMutexService) List

func (service *DistributedMutexService) List() ([]string, error)

func (*DistributedMutexService) Lock

func (service *DistributedMutexService) Lock(objectId string, data string, expireTimeout time.Duration) error

func (*DistributedMutexService) Unlock

func (service *DistributedMutexService) Unlock(objectId string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL