Documentation ¶
Index ¶
- Variables
- type DataHandler
- type EtcdKV
- func (etcd *EtcdKV) Close() error
- func (etcd *EtcdKV) DeleteOne(key string) (deleted bool, err error)
- func (etcd *EtcdKV) DeleteWithPrefix(key string) (deleted int64, err error)
- func (etcd *EtcdKV) GetObject(key string, obj interface{}) (err error)
- func (etcd *EtcdKV) GetOne(key string) (value []byte, err error)
- func (etcd *EtcdKV) GetWithPrefix(key string, handler DataHandler) (err error)
- func (etcd *EtcdKV) GetWithPrefixLimit(key string, limit int64, handler DataHandler) (err error)
- func (etcd *EtcdKV) Put(key, val string) (revision int64, err error)
- func (etcd *EtcdKV) PutObject(key string, value interface{}) (revision int64, err error)
- func (etcd *EtcdKV) Watch(key string, ...) *Watcher
- func (etcd *EtcdKV) WatchWithPrefix(key string, ...) *Watcher
- type EventType
- type KV
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var EventTypeNames = map[int32]string{
0: "PUT",
1: "DELETE",
}
EventTypeNames eventType names
Functions ¶
This section is empty.
Types ¶
type DataHandler ¶ added in v0.0.2
DataHandler data handler for GetWithPrefix, GetWithPrefixLimit
type EtcdKV ¶
type EtcdKV struct {
// contains filtered or unexported fields
}
EtcdKV implements KV
func (*EtcdKV) DeleteWithPrefix ¶
DeleteWithPrefix ..
func (*EtcdKV) GetWithPrefix ¶
func (etcd *EtcdKV) GetWithPrefix(key string, handler DataHandler) (err error)
GetWithPrefix ..
func (*EtcdKV) GetWithPrefixLimit ¶
func (etcd *EtcdKV) GetWithPrefixLimit(key string, limit int64, handler DataHandler) (err error)
GetWithPrefixLimit ..
type EventType ¶ added in v0.0.2
type EventType int32
EventType Watch event type
type KV ¶
type KV interface { Close() error PutObject(key string, value interface{}) (revision int64, err error) Put(key, val string) (revision int64, err error) GetOne(key string) (value []byte, err error) GetObject(key string, obj interface{}) (err error) GetWithPrefix(key string, handler DataHandler) (err error) GetWithPrefixLimit(key string, limit int64, handler DataHandler) (err error) DeleteOne(key string) (deleted bool, err error) DeleteWithPrefix(key string) (deleted int64, err error) Watch(key string, handler func(eventType EventType, fullPath string, rowID string, value []byte)) *Watcher WatchWithPrefix(key string, handler func(eventType EventType, fullPath string, rowID string, value []byte)) *Watcher }
KV ..
Click to show internal directories.
Click to hide internal directories.