From 2af46d9313b8dc0ebbbd38426d90f4818a2d668c Mon Sep 17 00:00:00 2001 From: Martin Lindhe Date: Thu, 1 Sep 2016 14:55:35 +0200 Subject: [PATCH] refactor: rename namespace to 'collector' --- {collectors => collector}/iis.go | 2 +- {collectors => collector}/logical_disk.go | 2 +- {collectors => collector}/os.go | 2 +- {collectors => collector}/wmi.go | 2 +- exporter.go | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) rename {collectors => collector}/iis.go (99%) rename {collectors => collector}/logical_disk.go (99%) rename {collectors => collector}/os.go (99%) rename {collectors => collector}/wmi.go (63%) diff --git a/collectors/iis.go b/collector/iis.go similarity index 99% rename from collectors/iis.go rename to collector/iis.go index a1eb96ad..f5554f4c 100644 --- a/collectors/iis.go +++ b/collector/iis.go @@ -1,7 +1,7 @@ // returns data points from Win32_PerfRawData_W3SVC_WebService // https://msdn.microsoft.com/en-us/library/aa394345.aspx - Win32_OperatingSystem class -package collectors +package collector import ( "flag" diff --git a/collectors/logical_disk.go b/collector/logical_disk.go similarity index 99% rename from collectors/logical_disk.go rename to collector/logical_disk.go index 2e5d9c38..6d33519d 100644 --- a/collectors/logical_disk.go +++ b/collector/logical_disk.go @@ -2,7 +2,7 @@ // https://msdn.microsoft.com/en-us/windows/hardware/aa394307(v=vs.71) - Win32_PerfRawData_PerfDisk_LogicalDisk class // https://msdn.microsoft.com/en-us/library/ms803973.aspx - LogicalDisk object reference -package collectors +package collector import ( "flag" diff --git a/collectors/os.go b/collector/os.go similarity index 99% rename from collectors/os.go rename to collector/os.go index 85051e19..ccb213e8 100644 --- a/collectors/os.go +++ b/collector/os.go @@ -1,7 +1,7 @@ // returns data points from Win32_OperatingSystem // https://msdn.microsoft.com/en-us/library/aa394239 - Win32_OperatingSystem class -package collectors +package collector import ( "log" diff --git a/collectors/wmi.go b/collector/wmi.go similarity index 63% rename from collectors/wmi.go rename to collector/wmi.go index 72552cb2..b955faac 100644 --- a/collectors/wmi.go +++ b/collector/wmi.go @@ -1,4 +1,4 @@ -package collectors +package collector const ( wmiNamespace = "wmi" diff --git a/exporter.go b/exporter.go index ac881a38..43da87fa 100644 --- a/exporter.go +++ b/exporter.go @@ -6,7 +6,7 @@ import ( "net/http" "sync" - "github.com/martinlindhe/wmi_exporter/collectors" + "github.com/martinlindhe/wmi_exporter/collector" "github.com/prometheus/client_golang/prometheus" ) @@ -29,9 +29,9 @@ var _ prometheus.Collector = &WmiExporter{} func NewWmiExporter() *WmiExporter { return &WmiExporter{ collectors: []prometheus.Collector{ - collectors.NewOSCollector(), - collectors.NewLogicalDiskCollector(), - collectors.NewIISCollector(), + collector.NewOSCollector(), + collector.NewLogicalDiskCollector(), + collector.NewIISCollector(), }, } }