Documentation ¶
Index ¶
- type Client
- func (p *Client) AddScheduler(schedulerName string) error
- func (p *Client) GetRegionByKey(key string) (*RegionInfo, error)
- func (p *Client) GetSiblingRegions(id uint64) ([]*RegionInfo, error)
- func (p *Client) GetStores() (*Stores, error)
- func (p *Client) ListRegions() ([]*RegionInfo, error)
- func (p *Client) Operators(input map[string]interface{}) error
- func (p *Client) RemoveScheduler(schedulerName string) error
- type RegionInfo
- type StoreInfo
- type Stores
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a HTTP Client for PD.
func NewPDClient ¶
NewPDClient creates a HTTP Client for PD.
func (*Client) AddScheduler ¶
AddScheduler adds the specified scheduler to PD.
func (*Client) GetRegionByKey ¶
func (p *Client) GetRegionByKey(key string) (*RegionInfo, error)
GetRegionByKey gets the region info by region key.
func (*Client) GetSiblingRegions ¶
func (p *Client) GetSiblingRegions(id uint64) ([]*RegionInfo, error)
GetSiblingRegions gets the siblings' region info.
func (*Client) ListRegions ¶
func (p *Client) ListRegions() ([]*RegionInfo, error)
ListRegions lists region infos.
func (*Client) RemoveScheduler ¶
RemoveScheduler removes the specified scheduler from PD.
type RegionInfo ¶
type RegionInfo struct { ID uint64 `json:"id"` StartKey string `json:"start_key"` EndKey string `json:"end_key"` Peers []*metapb.Peer `json:"peers,omitempty"` Leader *metapb.Peer `json:"leader,omitempty"` }
RegionInfo represents PD region info.
Click to show internal directories.
Click to hide internal directories.