Documentation ¶
Index ¶
Constants ¶
View Source
const CollectorName = "LocalCollector"
Variables ¶
This section is empty.
Functions ¶
func NewLocalCollector ¶
func NewLocalCollector(config *config.Configuration, cgroupManager cgroup.CgroupManager) framework.MetricCollect
Types ¶
type CPUResourceCollector ¶
type CPUResourceCollector struct {
// contains filtered or unexported fields
}
func (*CPUResourceCollector) CollectLocalMetrics ¶
func (c *CPUResourceCollector) CollectLocalMetrics(metricInfo *LocalMetricInfo, start time.Time, window metav1.Duration) ([]*prompb.TimeSeries, error)
func (*CPUResourceCollector) Run ¶
func (c *CPUResourceCollector) Run()
type LocalCollector ¶
type LocalCollector struct { CgroupManager cgroup.CgroupManager InitiatedSubCollectors map[string]SubCollector }
func (*LocalCollector) CollectMetrics ¶
func (c *LocalCollector) CollectMetrics(metricInfo interface{}, start time.Time, window metav1.Duration) ([]*prompb.TimeSeries, error)
func (*LocalCollector) MetricCollectorName ¶
func (c *LocalCollector) MetricCollectorName() string
func (*LocalCollector) Run ¶
func (c *LocalCollector) Run() error
type LocalMetricInfo ¶
type MemoryResourceCollector ¶
type MemoryResourceCollector struct {
// contains filtered or unexported fields
}
func (*MemoryResourceCollector) CollectLocalMetrics ¶
func (c *MemoryResourceCollector) CollectLocalMetrics(metricInfo *LocalMetricInfo, start time.Time, window metav1.Duration) ([]*prompb.TimeSeries, error)
func (*MemoryResourceCollector) Run ¶
func (c *MemoryResourceCollector) Run()
type SubCollector ¶
type SubCollector interface { // Run runs sub collector Run() // CollectLocalMetrics returns local metric from sub collector CollectLocalMetrics(metricInfo *LocalMetricInfo, start time.Time, window metav1.Duration) ([]*prompb.TimeSeries, error) }
func NewCPUResourceCollector ¶
func NewCPUResourceCollector(cgroupManager cgroup.CgroupManager) (SubCollector, error)
func NewMemoryResourceCollector ¶
func NewMemoryResourceCollector(cgroupManager cgroup.CgroupManager) (SubCollector, error)
Click to show internal directories.
Click to hide internal directories.