Documentation ¶
Index ¶
- type EtcdKVS
- func (e *EtcdKVS) AtomicDecr(key string) error
- func (e *EtcdKVS) AtomicIncr(key string) error
- func (e *EtcdKVS) BlockingWaitAndGet(key string, value string, newKey string) (string, error)
- func (e *EtcdKVS) CompareAndPut(key string, oldVal string, newVal string) bool
- func (e *EtcdKVS) CompareAndPutIfNotEqual(key string, newVal string) (bool, error)
- func (e *EtcdKVS) CompareAndPutOrFetch(key string, oldVal string, newVal string) (*etcdClient.TxnResponse, error)
- func (e *EtcdKVS) CompareAndPutStateOrBusywait(key string, oldVal string, newVal string) bool
- func (e *EtcdKVS) CreateLock(name string) (kvstore.KvLock, error)
- func (e *EtcdKVS) DeleteClientMetaData(name string, nodeID string) error
- func (e *EtcdKVS) DeleteMetaData(name string) error
- func (e *EtcdKVS) KvMapFromPrefix(prefix string) (map[string]string, error)
- func (e *EtcdKVS) List(prefix string) ([]string, error)
- func (e *EtcdKVS) ReadMetaData(keys []string) ([]kvstore.KvPair, error)
- func (e *EtcdKVS) UpdateMetaData(entries []kvstore.KvPair) ([]kvstore.KvPair, error)
- func (e *EtcdKVS) WriteMetaData(entries []kvstore.KvPair) error
- type EtcdLock
- type VFileVolConnectivityData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdKVS ¶
type EtcdKVS struct {
// contains filtered or unexported fields
}
func NewKvStore ¶
NewKvStore function: start or join ETCD cluster depending on the role of the node
func (*EtcdKVS) AtomicDecr ¶
AtomicDecr - Decrease a key value by 1
func (*EtcdKVS) AtomicIncr ¶
AtomicIncr - Increase a key value by 1
func (*EtcdKVS) BlockingWaitAndGet ¶
BlockingWaitAndGet - Blocking wait until a key value becomes equal to a specific value then read the value of another key
func (*EtcdKVS) CompareAndPut ¶
CompareAndPut function: compare the value of the kay with oldVal if equal, replace with newVal and return true; or else, return false.
func (*EtcdKVS) CompareAndPutIfNotEqual ¶
CompareAndPutIfNotEqual - Compare and put a new value of the key if the current value is not equal to the new value
func (*EtcdKVS) CompareAndPutOrFetch ¶
func (e *EtcdKVS) CompareAndPutOrFetch(key string, oldVal string, newVal string) (*etcdClient.TxnResponse, error)
CompareAndPutOrFetch - Compare and put or get the current value of the key
func (*EtcdKVS) CompareAndPutStateOrBusywait ¶
CompareAndPutStateOrBusywait function: compare the volume state with oldVal if equal, replace with newVal and return true; or else, return false; waits if volume is in a state from where it can reach the ready state
func (*EtcdKVS) CreateLock ¶
CreateLock: create a ETCD lock for a given key, only setup the client session and mutex should be create when start to use the lock
func (*EtcdKVS) DeleteClientMetaData ¶
DeleteClientMetaData - Delete volume client metadata in KV store
func (*EtcdKVS) DeleteMetaData ¶
DeleteMetaData - Delete volume metadata in KV store
func (*EtcdKVS) KvMapFromPrefix ¶
KvMapFromPrefix - Create key-value pairs according to a given prefix
func (*EtcdKVS) ReadMetaData ¶
ReadMetaData - Read metadata in KV store
func (*EtcdKVS) UpdateMetaData ¶
UpdateMetaData - Read/Write/Delete metadata according to given key-value pairs
type EtcdLock ¶
type EtcdLock struct { // Key for this lock Key string // contains filtered or unexported fields }
func (*EtcdLock) BlockingLockWithLease ¶
BlockingLockWithLease: blocking wait to get a ETCD mutex on the given name until timeout
type VFileVolConnectivityData ¶
type VFileVolConnectivityData struct { Port int `json:"port,omitempty"` ServiceName string `json:"serviceName,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` }
VFileVolConnectivityData - Contains metadata of vFile volumes