Documentation
¶
Overview ¶
Package lock provides distributed locking
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrLockTimeout = errors.New("lock timeout")
)
Functions ¶
This section is empty.
Types ¶
type AcquireOption ¶
type AcquireOption func(o *AcquireOptions)
type Lock ¶
type Lock interface {
// Acquire a lock with given id
Acquire(id string, opts ...AcquireOption) error
// Release the lock with given id
Release(id string) error
}
Lock is a distributed locking interface
Directories
¶
| Path | Synopsis |
|---|---|
|
Package etcd is an etcd implementation of lock
|
Package etcd is an etcd implementation of lock |
|
Package http adds a http lock implementation
|
Package http adds a http lock implementation |
|
server
Package server implements the sync http server
|
Package server implements the sync http server |
|
Package memory provides a sync.Mutex implementation of the lock for local use
|
Package memory provides a sync.Mutex implementation of the lock for local use |
Click to show internal directories.
Click to hide internal directories.