Documentation ¶
Index ¶
- func GetEtcdAddrs(store kv.Storage) (kv.EtcdBackend, []string, error)
- func IsKeyspaceNotExistError(err error) bool
- func IsNotBootstrappedError(err error) bool
- func New(path string) (kv.Storage, error)
- func NewEtcdCli(store kv.Storage) (*clientv3.Client, error)
- func NewEtcdCliWithAddrs(addrs []string, ebd kv.EtcdBackend) (*clientv3.Client, error)
- func Register(name string, driver kv.Driver) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEtcdAddrs ¶
GetEtcdAddrs gets the etcd addrs from store if the store support it.
func IsKeyspaceNotExistError ¶
IsKeyspaceNotExistError returns true the error is caused by keyspace not exists.
func IsNotBootstrappedError ¶
IsNotBootstrappedError returns true if the error is pd not bootstrapped error.
func New ¶
New creates a kv Storage with path.
The path must be a URL format 'engine://path?params' like the one for session.Open() but with the dbname cut off. Examples:
goleveldb://relative/path boltdb:///absolute/path
The engine should be registered before creating storage.
func NewEtcdCli ¶
NewEtcdCli creates a new clientv3.Client from store if the store support it. the returned client might be nil. TODO currently uni-store/mock-tikv/tikv all implements EtcdBackend while they don't support actually. refactor this part.
func NewEtcdCliWithAddrs ¶
NewEtcdCliWithAddrs creates a new clientv3.Client with specified addrs and etcd backend.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package pdtypes contains type defines under PD.
|
Package pdtypes contains type defines under PD. |