Documentation ¶
Overview ¶
Package lock provides a simple lock/release library to be used on a single memcached instance.
This package is compatible with https://github.com/bradfitz/gomemcache but really any client will do, just implement the ./adapters.Adapter interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotAcquired is returned when a locker tries to lock an already locked resource ErrNotAcquired = errors.New("locker: not acquired") // ErrNotFound is returned when a lock does not exist in memcached ErrNotFound = errors.New("locker: not found") // ErrForbidden is returned when an owner attempts to release a non-owned locked ErrForbidden = errors.New("locker: forbidden") )
Functions ¶
This section is empty.
Types ¶
type Locker ¶
type Locker struct {
// contains filtered or unexported fields
}
Locker is the main entrypoint for locking operations
func (*Locker) GetCurrentOwner ¶
GetCurrentOwner returns the current lock owner return ErrNotFound if lock does not exist
Directories ¶
Path | Synopsis |
---|---|
gomemcache
Package gomemcache implements the adapters.Adapter interface for https://github.com/bradfitz/gomemcache/blob/master/memcache/memcache.go
|
Package gomemcache implements the adapters.Adapter interface for https://github.com/bradfitz/gomemcache/blob/master/memcache/memcache.go |
Click to show internal directories.
Click to hide internal directories.