Commit Graph

5 Commits

Author SHA1 Message Date
tariqibrahim d34c6dc785 lint: add golangci-lint to the CI pipeline of kube-state-metrics 2019-03-04 10:13:18 -08:00
tariqibrahim 68573d75a5 fix all golint issues in kube-state-metrics 2019-03-02 10:11:18 -08:00
Max Leonard Inden 0841ce841f
pkg/metric/generator: Make GenerateFunc return pointer to Family
Instead of returning a Family right away, make GenerateFunc return a
pointer to a Family, matching the convention across the k8s project and
removing the need to do so later in the code path.
2019-02-04 09:36:39 +01:00
Max Leonard Inden 6b1ed0bec9
Deduplicate metric name
Instead of defining the metric name both in the metric family generator
as well as the metric itself, with this patch the metric name is
injected into the metric family by the metric family generator.
2019-01-25 17:11:47 +01:00
Lili Cosic 3498aa7e9e *: Move collectors pkg to internal directory
This makes the rest of the packages useful to be used in a standalone
library without importing the kube-state-metrics specific collectors.

* Rename collectors -> collector package

* Rename metrics -> metric package

* Add metricFamily mocking in tests to prevent cyclic dependency.
2019-01-23 10:51:30 +01:00