Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivateRequest ¶
type PoolStatus ¶
type PoolStatus struct {
State PoolState `json:"state"`
}
type ServerInfo ¶
type ServerInfo struct {
IsOwner bool `json:"is_owner"`
}
ServerInfo is the information of a TiDB server. ref https://github.com/pingcap/tidb/blob/v8.1.0/pkg/server/handler/tikvhandler/tikv_handler.go#L1696
type TiDBClient ¶
type TiDBClient interface {
// GetHealth gets the health status of this TiDB server.
GetHealth(ctx context.Context) (bool, error)
// GetInfo gets the information of this TiDB server.
GetInfo(ctx context.Context) (*ServerInfo, error)
// SetServerLabels sets the labels of this TiDB server.
SetServerLabels(ctx context.Context, labels map[string]string) error
// GetPoolStatus get the tidb pool status(standby or activated) of the tidb
GetPoolStatus(ctx context.Context) (*PoolStatus, error)
// Activate sets the keyspace of a standby TiDB instance.
Activate(ctx context.Context, keyspace string) error
}
TiDBClient provides TiDB server's APIs used by TiDB Operator.
func NewTiDBClient ¶
NewTiDBClient returns a new TiDBClient.
Click to show internal directories.
Click to hide internal directories.