tidb

package
v0.0.0-...-68360ed Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 26 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) Get

func (c *Client) Get(relativeURI string) (*httpc.Response, error)

func (*Client) OpenSQLConn

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

func (*Client) SendGetRequest

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

FIXME: SendGetRequest should be extracted, as a common method.

func (Client) WithEnforcedStatusAPIAddress

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

func (Client) WithSQLAPIAddress

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

func (Client) WithStatusAPIAddress

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

func (Client) WithStatusAPITimeout

func (c Client) WithStatusAPITimeout(timeout time.Duration) *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