Documentation
¶
Index ¶
- Variables
- type PDClient
- func (pc *PDClient) DelStore(host string, retryOpt *utils.RetryOption) error
- func (pc *PDClient) GetReplicateConfig() ([]byte, error)
- func (pc *PDClient) GetStores() (*pdserverapi.StoresInfo, error)
- func (pc *PDClient) GetURL(addr string) string
- func (pc *PDClient) IsUp(host string) (bool, error)
- func (pc *PDClient) UpdateReplicateConfig(body io.Reader) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStoreNotExists = errors.New("store not exists")
ErrStoreNotExists represents the store not exists.
Functions ¶
This section is empty.
Types ¶
type PDClient ¶
type PDClient struct {
// contains filtered or unexported fields
}
PDClient is an HTTP client of the PD server
func NewPDClient ¶
NewPDClient returns a new PDClient
func (*PDClient) DelStore ¶
func (pc *PDClient) DelStore(host string, retryOpt *utils.RetryOption) error
DelStore deletes stores from a (TiKV) host The host parameter should be in format of IP:Port, that matches store's address
func (*PDClient) GetReplicateConfig ¶
GetReplicateConfig gets the PD replicate config
func (*PDClient) GetStores ¶
func (pc *PDClient) GetStores() (*pdserverapi.StoresInfo, error)
GetStores queries the stores info from PD server
Click to show internal directories.
Click to hide internal directories.