Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(_ context.Context, svr *server.Server) (http.Handler, apiutil.APIServiceGroup, error)
NewHandler creates a HTTP handler for API.
func TopNRegions ¶
func TopNRegions(regions []*core.RegionInfo, less func(a, b *core.RegionInfo) bool, n int) []*core.RegionInfo
TopNRegions returns top n regions according to the given rule.
Types ¶
type Health ¶
type Health struct {
Name string `json:"name"`
MemberID uint64 `json:"member_id"`
ClientUrls []string `json:"client_urls"`
Health bool `json:"health"`
}
Health reflects the cluster's health. NOTE: This type is exported by HTTP API. Please pay more attention when modifying it.
type ListServiceGCSafepoint ¶
type ListServiceGCSafepoint struct {
ServiceGCSafepoints []*endpoint.ServiceSafePoint `json:"service_gc_safe_points"`
MinServiceGcSafepoint uint64 `json:"min_service_gc_safe_point,omitempty"`
GCSafePoint uint64 `json:"gc_safe_point"`
}
ListServiceGCSafepoint is the response for list service GC safepoint. NOTE: This type is exported by HTTP API. Please pay more attention when modifying it. This type is in sync with `pd/client/http/types.go`.
type Progress ¶
type Progress struct {
Action string `json:"action"`
StoreID uint64 `json:"store_id,omitempty"`
Progress float64 `json:"progress"`
CurrentSpeed float64 `json:"current_speed"`
LeftSeconds float64 `json:"left_seconds"`
}
Progress contains status about a progress.
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() any
Pop removes the minimum element (according to Less) from the heap and returns it.
func (*RegionHeap) Swap ¶
func (h *RegionHeap) Swap(i, j int)
Source Files
¶
- admin.go
- checker.go
- cluster.go
- config.go
- diagnostic.go
- health.go
- hot_status.go
- label.go
- log.go
- member.go
- metric.go
- middleware.go
- min_resolved_ts.go
- operator.go
- plugin_disable.go
- pprof.go
- region.go
- region_label.go
- replication_mode.go
- router.go
- rule.go
- scheduler.go
- server.go
- service_gc_safepoint.go
- service_middleware.go
- stats.go
- status.go
- store.go
- trend.go
- tso.go
- unsafe_operation.go
- version.go