Documentation
¶
Overview ¶
Package input defines several different data inputs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPIPeriodicGetter ¶
func NewAPIPeriodicGetter(pdAddr string, client *http.Client) regionpkg.RegionsInfoGenerator
Types ¶
type RegionInfo ¶
type RegionInfo struct {
ID uint64 `json:"id"`
StartKey string `json:"start_key"`
EndKey string `json:"end_key"`
WrittenBytes uint64 `json:"written_bytes"`
ReadBytes uint64 `json:"read_bytes"`
WrittenKeys uint64 `json:"written_keys"`
ReadKeys uint64 `json:"read_keys"`
ApproximateSize int64 `json:"approximate_size"`
ApproximateKeys int64 `json:"approximate_keys"`
}
RegionInfo records detail region info for api usage.
type RegionsInfo ¶
type RegionsInfo struct {
Count int `json:"count"`
Regions []*RegionInfo `json:"regions"`
}
RegionsInfo contains some regions with the detailed region info.
func (*RegionsInfo) GetKeys ¶
func (rs *RegionsInfo) GetKeys() []string
func (*RegionsInfo) Len ¶
func (rs *RegionsInfo) Len() int
type StatInput ¶
StatInput is the interface that different data inputs need to implement.
func NewStatInput ¶
func NewStatInput(ctx context.Context, provider *region.PDDataProvider) StatInput
func PeriodicInput ¶
func PeriodicInput(ctx context.Context, periodicGetter region.RegionsInfoGenerator) StatInput
Click to show internal directories.
Click to hide internal directories.