Documentation
¶
Overview ¶
Package client defines the distrilock client interface and associated types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// Acquire will acquire a named lock through the distrilock daemon.
Acquire(lockName string) (*Lock, error)
// Release will release a locked name previously acquired in this session.
Release(l *Lock) error
// IsLocked returns true when distrilock deamon estabilished that lock is currently acquired.
IsLocked(lockName string) (bool, error)
// Verify will verify that the lock is currently held by the client and healthy.
Verify(l *Lock) error
// Close releases all session-specific resources of this client.
Close() error
}
Client is a generic distrilock client interface.
type Error ¶
type Error struct {
Result api.LockCommandResult
Reason string
}
Error is the composite error return by all client method calls.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
base
Package bclient is an internal package for the common API client functionality.
|
Package bclient is an internal package for the common API client functionality. |
|
Package tcp provides a distrilock client over TCP.
|
Package tcp provides a distrilock client over TCP. |
|
Package ws provides a distrilock client over Websockets; both binary (GOP) and text (JSON) messages are supported.
|
Package ws provides a distrilock client over Websockets; both binary (GOP) and text (JSON) messages are supported. |
Click to show internal directories.
Click to hide internal directories.