Skip to content

Commit

Permalink
Rename package collectors -> collector
Browse files Browse the repository at this point in the history
  • Loading branch information
talal committed Jan 16, 2020
1 parent 3be1913 commit 10e1e59
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GO_ALLPKGS := $(shell go list $(GO_BUILDFLAGS) $(PKG)/...)
# which packages to test with `go test`?
GO_TESTPKGS := $(shell go list $(GO_BUILDFLAGS) -f '{{if .TestGoFiles}}{{.ImportPath}}{{end}}' $(PKG)/...)
# which packages to measure coverage for?
GO_COVERPKGS := $(shell go list $(GO_BUILDFLAGS) $(PKG) $(PKG)/collectors)
GO_COVERPKGS := $(shell go list $(GO_BUILDFLAGS) $(PKG) $(PKG)/collector)
# output files from `go test`
GO_COVERFILES := $(patsubst %,build/%.cover.out,$(subst /,_,$(GO_TESTPKGS)))

Expand Down
2 changes: 1 addition & 1 deletion collectors/collector.go → collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package collectors
package collector

import (
"strings"
Expand Down
2 changes: 1 addition & 1 deletion collectors/dispersion.go → collector/dispersion.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package collectors
package collector

import (
"encoding/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package collectors
package collector

import (
"path/filepath"
Expand Down
2 changes: 1 addition & 1 deletion collectors/recon.go → collector/recon.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package collectors
package collector

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion collectors/recon_test.go → collector/recon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package collectors
package collector

import (
"path/filepath"
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/sapcc/go-bits/httpee"
"github.com/sapcc/go-bits/logg"
"github.com/sapcc/swift-health-exporter/collectors"
"github.com/sapcc/swift-health-exporter/collector"
)

func main() {
logg.ShowDebug, _ = strconv.ParseBool(os.Getenv("DEBUG"))
swiftDispersionReportPath := getExecutablePath("SWIFT_DISPERSION_REPORT_PATH", "swift-dispersion-report")
swiftReconPath := getExecutablePath("SWIFT_RECON_PATH", "swift-recon")

prometheus.MustRegister(collectors.NewDispersionCollector(swiftDispersionReportPath))
prometheus.MustRegister(collectors.NewReconCollector(swiftReconPath))
prometheus.MustRegister(collector.NewDispersionCollector(swiftDispersionReportPath))
prometheus.MustRegister(collector.NewReconCollector(swiftReconPath))

// this port has been allocated for Swift health exporter
// See: https://github.com/prometheus/prometheus/wiki/Default-port-allocations
Expand Down

0 comments on commit 10e1e59

Please sign in to comment.