aboutsummaryrefslogtreecommitdiff
path: root/collector/collector.go
diff options
context:
space:
mode:
authorTobias Schmidt <tobidt@gmail.com>2017-02-28 12:44:53 -0400
committerTobias Schmidt <tobidt@gmail.com>2017-02-28 13:05:38 -0400
commitc7034357900029e05b58d099104b1ad443edac73 (patch)
tree454ea3a5e2f1dd15de37f96c482dc8df7fd94ada /collector/collector.go
parent5289ffb27074ac9b9a48e5bf1c42d1b8937eb16f (diff)
downloadprometheus_node_collector-c7034357900029e05b58d099104b1ad443edac73.tar.bz2
prometheus_node_collector-c7034357900029e05b58d099104b1ad443edac73.tar.xz
prometheus_node_collector-c7034357900029e05b58d099104b1ad443edac73.zip
Fix all open go lint and vet issues
Diffstat (limited to 'collector/collector.go')
-rw-r--r--collector/collector.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/collector/collector.go b/collector/collector.go
index 1d57db3..accfb8c 100644
--- a/collector/collector.go
+++ b/collector/collector.go
@@ -11,7 +11,7 @@
11// See the License for the specific language governing permissions and 11// See the License for the specific language governing permissions and
12// limitations under the License. 12// limitations under the License.
13 13
14// Exporter is a prometheus exporter using multiple Factories to collect and export system metrics. 14// Package collector includes all individual collectors to gather and export system metrics.
15package collector 15package collector
16 16
17import ( 17import (
@@ -19,15 +19,17 @@ import (
19 "github.com/prometheus/common/log" 19 "github.com/prometheus/common/log"
20) 20)
21 21
22// Namespace defines the common namespace to be used by all metrics.
22const Namespace = "node" 23const Namespace = "node"
23 24
25// Factories contains the list of all available collectors.
24var Factories = make(map[string]func() (Collector, error)) 26var Factories = make(map[string]func() (Collector, error))
25 27
26func warnDeprecated(collector string) { 28func warnDeprecated(collector string) {
27 log.Warnf("The %s collector is deprecated and will be removed in the future!", collector) 29 log.Warnf("The %s collector is deprecated and will be removed in the future!", collector)
28} 30}
29 31
30// Interface a collector has to implement. 32// Collector is the interface a collector has to implement.
31type Collector interface { 33type Collector interface {
32 // Get new metrics and expose them via prometheus registry. 34 // Get new metrics and expose them via prometheus registry.
33 Update(ch chan<- prometheus.Metric) (err error) 35 Update(ch chan<- prometheus.Metric) (err error)