Documentation ¶
Index ¶
- func NewEtcdKVBase(client *clientv3.Client, rootPath string) *etcdKVBase
- func NewSlowLogTxn(client *clientv3.Client) clientv3.Txn
- type Base
- type LeveldbKV
- func (kv *LeveldbKV) Load(key string) (string, error)
- func (kv *LeveldbKV) LoadRange(startKey, endKey string, limit int) ([]string, []string, error)
- func (kv *LeveldbKV) Remove(key string) error
- func (kv *LeveldbKV) Save(key, value string) error
- func (kv *LeveldbKV) SaveRegions(regions map[string]*metapb.Region) error
- type SlowLogTxn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEtcdKVBase ¶
NewEtcdKVBase creates a new etcd kv.
Types ¶
type Base ¶
type Base interface { Load(key string) (string, error) LoadRange(key, endKey string, limit int) (keys []string, values []string, err error) Save(key, value string) error Remove(key string) error }
Base is an abstract interface for load/save pd cluster data.
type LeveldbKV ¶
LeveldbKV is a kv store using leveldb.
func NewLeveldbKV ¶
NewLeveldbKV is used to store regions information.
type SlowLogTxn ¶
SlowLogTxn wraps etcd transaction and log slow one.
func (*SlowLogTxn) Commit ¶
func (t *SlowLogTxn) Commit() (*clientv3.TxnResponse, error)
Commit implements Txn Commit interface.
Click to show internal directories.
Click to hide internal directories.