Documentation ¶
Index ¶
- func NewEtcd(timeout time.Duration, leaseTLL int64, config *clientv3.Config) error
- type Action
- type Etcd
- func (s *Etcd) Client() *clientv3.Client
- func (s *Etcd) CloseEtcd()
- func (s *Etcd) Delete(key string) error
- func (s *Etcd) GetWithKey(key string) ([]byte, error)
- func (s *Etcd) GetWithLastKey(key string) ([]byte, error)
- func (s *Etcd) GetWithList(key string, opts ...clientv3.OpOption) (map[string][]byte, error)
- func (s *Etcd) Put(key, value string) error
- func (s *Etcd) PutTimeout(key, value string, leaseTLL int64) error
- func (s *Etcd) PutWithLease(key, value string) error
- type Watch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct { //watch callback action Act namespace.WatcherAction //callback data B map[string][]byte }
type Etcd ¶
type Etcd struct {
// contains filtered or unexported fields
}
var DefaultEtcd *Etcd
func (*Etcd) GetWithKey ¶
GetWithKey get value with key
func (*Etcd) GetWithLastKey ¶
GetWithLastKey get value with last key
func (*Etcd) GetWithList ¶
func (*Etcd) PutTimeout ¶ added in v0.2.5
PutTimeout put one key/value to etcd with lease setting
func (*Etcd) PutWithLease ¶
PutWithLease put one key/value to etcd with lease setting use just one leaseId control all whit lease key/value data
type Watch ¶
type Watch struct {
// contains filtered or unexported fields
}
func (*Watch) CloseWatch ¶ added in v1.1.6
func (w *Watch) CloseWatch()
Click to show internal directories.
Click to hide internal directories.