Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter used to export collected metrics
func NewExporter ¶
func NewExporter(c *PromMetricCollector) (*Exporter, error)
NewExporter create exporter instance
func (*Exporter) Collect ¶
func (e *Exporter) Collect(ch chan<- prometheus.Metric)
Collect will called by prometheus, put the collected metrics into the channel
func (*Exporter) Describe ¶
func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
Describe will called by prometheus
type GarbageCollector ¶
type GarbageCollector struct {
// contains filtered or unexported fields
}
GarbageCollector a struct used to recycle k8s garbage instaces
func NewGarbageCollector ¶
func NewGarbageCollector(c *K8sClient, interval time.Duration) *GarbageCollector
NewGarbageCollector create GarbageCollector instance
func (*GarbageCollector) Start ¶
func (gc *GarbageCollector) Start()
Start used to start garbage collection
func (*GarbageCollector) Stop ¶
func (gc *GarbageCollector) Stop()
Stop used to stop garbage collection
type K8sClient ¶
type K8sClient struct {
// contains filtered or unexported fields
}
K8sClient used to query k8s api server
func NewK8sClient ¶
NewK8sClient used to create k8s client instance
type PromMetricCollector ¶
type PromMetricCollector struct {
// contains filtered or unexported fields
}
PromMetricCollector used to collect metrics for prometheus
func NewPromMetricCollector ¶
func NewPromMetricCollector(c *K8sClient, i time.Duration) *PromMetricCollector
NewPromMetricCollector used to create PromMetricCollector instance
func (*PromMetricCollector) Start ¶
func (p *PromMetricCollector) Start()
Start used to start metrics collection
func (*PromMetricCollector) Stop ¶
func (p *PromMetricCollector) Stop()
Stop used to stop metrics collection