collector

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package collector offers a service to retrieve metrics about credentials.

Index

Constants

View Source
const (
	PrometheusNamespace = "credentiald"

	PrometheusNameLabel         = "name"
	PrometheusOrganizationLabel = "organization"

	KubernetesOrganizationLabel = "giantswarm.io/organization"

	KubernetesCredentialNamespace = "giantswarm"
	KubernetesLabelSelector       = "app=credentiald"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Collector, error)

New creates a new Collector based on a configutation.

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

Collect collects metrics for prometheus

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

Describe collects metadata for a prometheus metric.

type Config

type Config struct {
	K8sClient kubernetes.Interface
	Logger    micrologger.Logger
}

Jump to

Keyboard shortcuts

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