locker

package
v0.0.0-...-90805a3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = log.New(os.Stderr, "", log.LstdFlags)

Functions

This section is empty.

Types

type AerospikeLocker

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

func NewAearospikeLocker

func NewAearospikeLocker(client *aerospike.Client, namespace string) *AerospikeLocker

func (*AerospikeLocker) Lock

func (al *AerospikeLocker) Lock(name string) (Releaser, bool, error)

func (*AerospikeLocker) LockWait

func (al *AerospikeLocker) LockWait(name string) (Releaser, error)

type AerospikeReleaser

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

func NewAerospikeReleaser

func NewAerospikeReleaser(locker *AerospikeLocker, stop chan bool, key *aerospike.Key) *AerospikeReleaser

func (*AerospikeReleaser) Release

func (ar *AerospikeReleaser) Release() error

type Locker

type Locker interface {
	Lock(string) (releaser Releaser, success bool, err error)
	LockWait(string) (releaser Releaser, err error)
}

type Releaser

type Releaser interface {
	Release() error
}

Jump to

Keyboard shortcuts

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