watchdog

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 22 Imported by: 0

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

func NewK8sClient() (*K8sClient, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL