pd

package
v0.0.0-...-a9907fb Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitPDClient

func InitPDClient(apiAddr string)

Types

type PDClient

type PDClient struct {
	ApiAddr string
	*http.Client
}
var GPDClinet *PDClient

func (*PDClient) GetTrend

func (pdc *PDClient) GetTrend() (trend Trend, err error)

type Trend

type Trend struct {
	Stores  []TrendStore  `json:"stores"`
	History *trendHistory `json:"history"`
}

Copy from github.com/pingcap/pd/server/api/trend.go Trend describes the cluster's schedule trend.

type TrendStore

type TrendStore struct {
	ID              uint64             `json:"id"`
	Address         string             `json:"address"`
	StateName       string             `json:"state_name"`
	Capacity        uint64             `json:"capacity"`
	Available       uint64             `json:"available"`
	RegionCount     int                `json:"region_count"`
	LeaderCount     int                `json:"leader_count"`
	StartTS         *time.Time         `json:"start_ts,omitempty"`
	LastHeartbeatTS *time.Time         `json:"last_heartbeat_ts,omitempty"`
	Uptime          *typeutil.Duration `json:"uptime,omitempty"`

	HotWriteFlow        uint64   `json:"hot_write_flow"`
	HotWriteRegionFlows []uint64 `json:"hot_write_region_flows"`
	HotReadFlow         uint64   `json:"hot_read_flow"`
	HotReadRegionFlows  []uint64 `json:"hot_read_region_flows"`
}

Jump to

Keyboard shortcuts

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