Documentation
¶
Index ¶
- Constants
- func BytesAddOne(in []byte) ([]byte, interface{}, error)
- func BytesToUint64(b []byte) uint64
- func DeleteKey(key []byte) *etcdpb.DeleteRangeRequest
- func GetKey(key []byte) *etcdpb.RangeRequest
- func GetPrefix(key []byte) *etcdpb.RangeRequest
- func KeyEquals(key []byte, value []byte) *etcdpb.Compare
- func KeyExists(key []byte) *etcdpb.Compare
- func KeyIsVersion(key []byte, version int64) *etcdpb.Compare
- func KeyNotExists(key []byte) *etcdpb.Compare
- func MkKey(s ...string) []byte
- func SetKey(key []byte, value []byte) *etcdpb.PutRequest
- func SetLeasedKey(lease int64, key []byte, value []byte) *etcdpb.PutRequest
- func Uint64ToBytes(x uint64) []byte
- func Uint64ToHex(x uint64) string
- type AtomicModifyFunc
- type Etcd
- func (c *Etcd) AtomicModifyKey(key []byte, f AtomicModifyFunc) (interface{}, error)
- func (e *Etcd) Close() error
- func (c *Etcd) CommitINodeIndex(vid agro.VolumeID) (agro.INodeID, error)
- func (c *Etcd) DumpMetadata(w io.Writer) error
- func (c *Etcd) GetINodeIndex(vid agro.VolumeID) (agro.INodeID, error)
- func (c *Etcd) GetLease() (int64, error)
- func (c *Etcd) GetPeers() (agro.PeerInfoList, error)
- func (c *Etcd) GetRing() (agro.Ring, error)
- func (c *Etcd) GetVolume(volume string) (*models.Volume, error)
- func (c *Etcd) GetVolumes() ([]*models.Volume, error)
- func (c *Etcd) GlobalMetadata() (agro.GlobalMetadata, error)
- func (e *Etcd) Kind() agro.MetadataKind
- func (c *Etcd) NewVolumeID() (agro.VolumeID, error)
- func (c *Etcd) RegisterPeer(lease int64, p *models.PeerInfo) error
- func (c *Etcd) SetRing(ring agro.Ring) error
- func (e *Etcd) SubscribeNewRings(ch chan agro.Ring)
- func (c *Etcd) UUID() string
- func (e *Etcd) UnsubscribeNewRings(ch chan agro.Ring)
- func (e *Etcd) WithContext(ctx context.Context) agro.MetadataService
- type Transact
Constants ¶
View Source
const (
KeyPrefix = "/github.com/coreos/agro/"
)
Variables ¶
This section is empty.
Functions ¶
func BytesAddOne ¶
func BytesToUint64 ¶
func DeleteKey ¶
func DeleteKey(key []byte) *etcdpb.DeleteRangeRequest
func GetKey ¶
func GetKey(key []byte) *etcdpb.RangeRequest
func GetPrefix ¶
func GetPrefix(key []byte) *etcdpb.RangeRequest
func KeyNotExists ¶
func SetLeasedKey ¶
func SetLeasedKey(lease int64, key []byte, value []byte) *etcdpb.PutRequest
func Uint64ToBytes ¶
func Uint64ToHex ¶
Types ¶
type AtomicModifyFunc ¶
AtomicModifyFunc is a class of commutative functions that, given the current state of a key's value `in`, returns the new state of the key `out`, and `data` to be returned to the calling function on success, or an `err`.
This function may be run mulitple times, if the value has changed in the time between getting the data and setting the new value.
type Etcd ¶
func (*Etcd) AtomicModifyKey ¶
func (c *Etcd) AtomicModifyKey(key []byte, f AtomicModifyFunc) (interface{}, error)
func (*Etcd) CommitINodeIndex ¶
func (*Etcd) DumpMetadata ¶
func (*Etcd) GetPeers ¶
func (c *Etcd) GetPeers() (agro.PeerInfoList, error)
func (*Etcd) GetVolumes ¶
func (*Etcd) GlobalMetadata ¶
func (c *Etcd) GlobalMetadata() (agro.GlobalMetadata, error)
func (*Etcd) Kind ¶
func (e *Etcd) Kind() agro.MetadataKind
func (*Etcd) NewVolumeID ¶
func (*Etcd) SubscribeNewRings ¶
func (*Etcd) UnsubscribeNewRings ¶
func (*Etcd) WithContext ¶
func (e *Etcd) WithContext(ctx context.Context) agro.MetadataService
Click to show internal directories.
Click to hide internal directories.