driver

package
v0.0.0-...-503c688 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrySetupGlobalResourceController

func TrySetupGlobalResourceController(ctx context.Context, serverID uint64, s kv.Storage) error

TrySetupGlobalResourceController tries to setup global resource controller.

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