Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRegion ¶
func InitRegion(r *core.RegionInfo, s *regionInfo) *regionInfo
InitRegion init a new api RegionInfo from the core.RegionInfo.
Types ¶
type PeerStats ¶
type PeerStats struct {
Name string `json:"name"`
ID string `json:"id"`
State string `json:"state"`
StartTime time.Time `json:"startTime"`
LeaderInfo struct {
Leader string `json:"leader"`
Uptime string `json:"uptime"`
StartTime time.Time `json:"startTime"`
} `json:"leaderInfo"`
RecvAppendRequestCnt int `json:"recvAppendRequestCnt"`
SendAppendRequestCnt int `json:"sendAppendRequestCnt"`
}
PeerStats is the etcd peers' stats.
type Recommendation ¶
type Recommendation struct {
Module string `json:"module"`
Level string `json:"level"`
Description string `json:"description"`
Instruction string `json:"instruction"`
}
Recommendation contains a potential problem and possible way to deal with it.
type RegionHeap ¶
type RegionHeap struct {
// contains filtered or unexported fields
}
RegionHeap implements heap.Interface, used for selecting top n regions.
func (*RegionHeap) Len ¶
func (h *RegionHeap) Len() int
func (*RegionHeap) Less ¶
func (h *RegionHeap) Less(i, j int) bool
func (*RegionHeap) Min ¶
func (h *RegionHeap) Min() *core.RegionInfo
Min returns the minimum region from the heap.
func (*RegionHeap) Pop ¶
func (h *RegionHeap) Pop() interface{}
Pop removes the minimum element (according to Less) from the heap and returns it.
func (*RegionHeap) Push ¶
func (h *RegionHeap) Push(x interface{})
Push pushes an element x onto the heap.
func (*RegionHeap) Swap ¶
func (h *RegionHeap) Swap(i, j int)
type StoreInfo ¶
type StoreInfo struct {
Store *MetaStore `json:"store"`
Status *StoreStatus `json:"status"`
}
StoreInfo contains information about a store.
type StoreStatus ¶
type StoreStatus struct {
Capacity typeutil.ByteSize `json:"capacity,omitempty"`
Available typeutil.ByteSize `json:"available,omitempty"`
LeaderCount int `json:"leader_count,omitempty"`
LeaderWeight float64 `json:"leader_weight,omitempty"`
LeaderScore float64 `json:"leader_score,omitempty"`
LeaderSize int64 `json:"leader_size,omitempty"`
RegionCount int `json:"region_count,omitempty"`
RegionWeight float64 `json:"region_weight,omitempty"`
RegionScore float64 `json:"region_score,omitempty"`
RegionSize int64 `json:"region_size,omitempty"`
SendingSnapCount uint32 `json:"sending_snap_count,omitempty"`
ReceivingSnapCount uint32 `json:"receiving_snap_count,omitempty"`
ApplyingSnapCount uint32 `json:"applying_snap_count,omitempty"`
IsBusy bool `json:"is_busy,omitempty"`
StartTS *time.Time `json:"start_ts,omitempty"`
LastHeartbeatTS *time.Time `json:"last_heartbeat_ts,omitempty"`
Uptime *typeutil.Duration `json:"uptime,omitempty"`
}
StoreStatus contains status about a store.
type StoresInfo ¶
StoresInfo records stores' info.
Click to show internal directories.
Click to hide internal directories.