Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*TiKVDriver)
Option is a function that changes some config of Driver
func WithPDClientConfig ¶
WithPDClientConfig changes the config.PDClient used by tikv driver.
func WithSecurity ¶
WithSecurity changes the config.Security used by tikv driver.
func WithTiKVClientConfig ¶
func WithTiKVClientConfig(client config.TiKVClient) Option
WithTiKVClientConfig changes the config.TiKVClient used by tikv driver.
func WithTxnLocalLatches ¶
func WithTxnLocalLatches(t config.TxnLocalLatches) Option
WithTxnLocalLatches changes the config.TxnLocalLatches used by tikv driver.
type TiKVDriver ¶
type TiKVDriver struct {
// contains filtered or unexported fields
}
TiKVDriver implements engine TiKV.
func (TiKVDriver) Open ¶
func (d TiKVDriver) Open(path string) (kv.Storage, error)
Open opens or creates an TiKV storage with given path using global config. Path example: tikv://etcd-node1:port,etcd-node2:port?cluster=1&disableGC=false
func (TiKVDriver) OpenWithOptions ¶
func (d TiKVDriver) OpenWithOptions(path string, options ...Option) (resStore kv.Storage, err error)
OpenWithOptions is used by other program that use tidb as a library, to avoid modifying GlobalConfig unspecified options will be set to global config