Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerStatuses ¶
type ContainerStatuses = v1.ContainerStatus
type ControlPlaneClient ¶
type Gauge ¶
type Gauge = prometheus.Gauge
type GaugeOpts ¶
type GaugeOpts = prometheus.GaugeOpts
type KubernetesClient ¶
type KubernetesClient struct {
// contains filtered or unexported fields
}
Real implementation of a Kubernetes client
func NewKubernetesClient ¶
func NewKubernetesClient(log zerolog.Logger) *KubernetesClient
type MetricsClient ¶
type MetricsClient interface {
NewGauge(opts prometheus.GaugeOpts) Gauge
}
MetricsClient is a prometheus metrics client
type MockKubernetesClient ¶
MockKubernetesClient is a mock implementation of KubernetesClient. It's used for testing. Normally I'd just use like https://github.com/golang/mock
type NoopMetrics ¶
type NoopMetrics struct{}
NoopMetrics is an empty metrics client that doesn't register to any metrics collector
func (*NoopMetrics) NewGauge ¶
func (n *NoopMetrics) NewGauge(opts prometheus.GaugeOpts) Gauge
NewGauge will create an empty prometheus counter but will not register it
type ObjectMeta ¶
type ObjectMeta = metav1.ObjectMeta
type PrometheusMetrics ¶
type PrometheusMetrics struct{}
PrometheusMetrics represents a prometheus metrics client
func (*PrometheusMetrics) NewGauge ¶
func (p *PrometheusMetrics) NewGauge(opts prometheus.GaugeOpts) Gauge
NewGauge returns a new counter metric that's registered to the automatic prometheus collector
Click to show internal directories.
Click to hide internal directories.