tidb

package
v0.0.0-...-47e18b9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTiDBConnFailed          = ErrNS.NewType("tidb_conn_failed")
	ErrTiDBAuthFailed          = ErrNS.NewType("tidb_auth_failed")
	ErrTiDBClientRequestFailed = ErrNS.NewType("client_request_failed")
)
View Source
var (
	ErrNS = errorx.NewNamespace("error.tidb")
)
View Source
var (
	ErrNoAliveTiDB = ErrNS.NewType("no_alive_tidb")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewTiDBClient

func NewTiDBClient(lc fx.Lifecycle, config *config.Config, etcdClient *clientv3.Client, httpClient *httpc.Client) *Client

func (*Client) OpenSQLConn

func (c *Client) OpenSQLConn(user string, pass string) (*gorm.DB, error)

func (*Client) SendGetRequest

func (c *Client) SendGetRequest(path string) ([]byte, error)

func (*Client) WithSQLAPIAddress

func (c *Client) WithSQLAPIAddress(host string, sqlPort int) *Client

func (*Client) WithStatusAPIAddress

func (c *Client) WithStatusAPIAddress(host string, statusPort int) *Client

type Forwarder

type Forwarder struct {
	// contains filtered or unexported fields
}

func (*Forwarder) Start

func (f *Forwarder) Start(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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