tidb

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TIDB_DRIVER_ID = "tidb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Tidb

type Tidb struct {
	DB *sql.DB
}

func (*Tidb) Close

func (t *Tidb) Close()

func (*Tidb) CompleteParts

func (t *Tidb) CompleteParts(uploadId uint64, parts []*types.PartInfo) (err error)

func (*Tidb) DeleteGcObjects

func (t *Tidb) DeleteGcObjects(objects ...*types.GcObject) (err error)

delete gc objects meta.

func (*Tidb) DeleteParts

func (t *Tidb) DeleteParts(uploadId uint64) error

func (*Tidb) GetCluster

func (t *Tidb) GetCluster(fsid, pool string) (cluster types.Cluster, err error)

cluster

func (*Tidb) GetGcObjects

func (t *Tidb) GetGcObjects(marker int64, limit int) ([]*types.GcObject, error)

func (*Tidb) ListParts

func (t *Tidb) ListParts(uploadId uint64) ([]*types.PartInfo, error)

* ListParts: list all the parts which belong to the uploadId. * @return: the related parts which are sorted by PartNum asc. *

func (*Tidb) PutGcObjects

func (t *Tidb) PutGcObjects(objects ...*types.GcObject) (err error)

delete objects

func (*Tidb) PutPart

func (t *Tidb) PutPart(partInfo *types.PartInfo) (err error)

func (*Tidb) PutPartsInGc

func (t *Tidb) PutPartsInGc(parts []*types.PartInfo) (err error)

type TidbDriver

type TidbDriver struct {
}

func (*TidbDriver) OpenDB

func (td *TidbDriver) OpenDB(dbCfg config.DatabaseConfig) (driver.DB, error)

Jump to

Keyboard shortcuts

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