Documentation
¶
Index ¶
- Constants
- type EtcdEvent
- type EtcdStorage
- func (etcd *EtcdStorage) Close()
- func (etcd *EtcdStorage) Create(key, val string, lease int64) (*clientv3.PutResponse, error)
- func (etcd *EtcdStorage) Delete(key string, withprefix bool) error
- func (etcd *EtcdStorage) GetRevision(key string) (int64, error)
- func (etcd *EtcdStorage) Query(key string, withprefix bool, endkey string, limit int64, revision *int64) (*clientv3.GetResponse, error)
- func (etcd *EtcdStorage) SetWatchPrefix(watchPrefix string)
- func (etcd *EtcdStorage) Watch(revision int64, key string, c chan *EtcdEvent)
- func (etcd *EtcdStorage) WatchClose()
- func (etcd *EtcdStorage) WatchPrefix() string
Constants ¶
View Source
const ( EtcdEventTypeUpdate = "update" EtcdEventTypeCreate = "create" EtcdEventTypeDelete = "delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdStorage ¶
type EtcdStorage struct {
// contains filtered or unexported fields
}
func NewEtcdStorage ¶
func NewEtcdStorage(id, watchPrefix string, client *clientv3.Client) *EtcdStorage
func (*EtcdStorage) Close ¶
func (etcd *EtcdStorage) Close()
func (*EtcdStorage) Create ¶
func (etcd *EtcdStorage) Create(key, val string, lease int64) (*clientv3.PutResponse, error)
func (*EtcdStorage) GetRevision ¶
func (etcd *EtcdStorage) GetRevision(key string) (int64, error)
func (*EtcdStorage) Query ¶
func (etcd *EtcdStorage) Query(key string, withprefix bool, endkey string, limit int64, revision *int64) (*clientv3.GetResponse, error)
func (*EtcdStorage) SetWatchPrefix ¶
func (etcd *EtcdStorage) SetWatchPrefix(watchPrefix string)
func (*EtcdStorage) Watch ¶
func (etcd *EtcdStorage) Watch(revision int64, key string, c chan *EtcdEvent)
func (*EtcdStorage) WatchClose ¶
func (etcd *EtcdStorage) WatchClose()
func (*EtcdStorage) WatchPrefix ¶
func (etcd *EtcdStorage) WatchPrefix() string
Click to show internal directories.
Click to hide internal directories.