Versions in this module Expand all Collapse all v0 v0.1.0 Jun 15, 2023 Changes in this version + var MaxScaleInStep uint64 = 1 + var MaxScaleOutStep uint64 = 1 + var MetricsTimeDuration = time.Minute + func NewHandler(_ context.Context, svr *server.Server) (http.Handler, apiutil.APIServiceGroup, error) + type CPURule struct + MaxThreshold float64 + MinThreshold float64 + ResourceTypes []string + type ComponentType int + const TiDB + const TiKV + func (c ComponentType) String() string + type HTTPHandler struct + func NewHTTPHandler(svr *server.Server, rd *render.Render) *HTTPHandler + func (h *HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type MetricType int + const CPUQuota + const CPUUsage + func (c MetricType) String() string + type Plan struct + Component string + Count uint64 + Labels map[string]string + ResourceType string + type PrometheusQuerier struct + func NewPrometheusQuerier(client promClient.Client) *PrometheusQuerier + func (prom *PrometheusQuerier) Query(options *QueryOptions) (QueryResult, error) + type Querier interface + Query func(options *QueryOptions) (QueryResult, error) + type QueryOptions struct + func NewQueryOptions(component ComponentType, metric MetricType, addresses []string, ...) *QueryOptions + type QueryResult map[string]float64 + type Resource struct + CPU uint64 + Count *uint64 + Memory uint64 + ResourceType string + Storage uint64 + type Rule struct + CPURule *CPURule + Component string + StorageRule *StorageRule + type StorageRule struct + MinThreshold float64 + ResourceTypes []string + type Strategy struct + Resources []*Resource + Rules []*Rule + type TiDBInfo struct + Address string + GitHash *string + Labels map[string]string + StartTimestamp *int64 + Version *string + func GetTiDB(etcdClient *clientv3.Client, address string) (*TiDBInfo, error) + func GetTiDBs(etcdClient *clientv3.Client) ([]*TiDBInfo, error)