driver

package
v1.1.0-beta.0...-8832684 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

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

func WithPDClientConfig(client config.PDClient) Option

WithPDClientConfig changes the config.PDClient used by tikv driver.

func WithSecurity

func WithSecurity(s config.Security) Option

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL