chore: cleanup move private packages to internal (#1665)

This commit is contained in:
Jan-Otto Kröpke
2024-10-03 20:34:45 +02:00
committed by GitHub
parent 5d95610c84
commit 7e9976efd3
50 changed files with 1301 additions and 1301 deletions

View File

@@ -7,7 +7,7 @@ import (
"log/slog"
"github.com/alecthomas/kingpin/v2"
types2 "github.com/prometheus-community/windows_exporter/internal/types"
"github.com/prometheus-community/windows_exporter/internal/types"
"github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
)
@@ -63,7 +63,7 @@ func (c *Collector) Build(_ *slog.Logger, wmiClient *wmi.Client) error {
c.wmiClient = wmiClient
c.temperature = prometheus.NewDesc(
prometheus.BuildFQName(types2.Namespace, Name, "temperature_celsius"),
prometheus.BuildFQName(types.Namespace, Name, "temperature_celsius"),
"(Temperature)",
[]string{
"name",
@@ -71,7 +71,7 @@ func (c *Collector) Build(_ *slog.Logger, wmiClient *wmi.Client) error {
nil,
)
c.percentPassiveLimit = prometheus.NewDesc(
prometheus.BuildFQName(types2.Namespace, Name, "percent_passive_limit"),
prometheus.BuildFQName(types.Namespace, Name, "percent_passive_limit"),
"(PercentPassiveLimit)",
[]string{
"name",
@@ -79,7 +79,7 @@ func (c *Collector) Build(_ *slog.Logger, wmiClient *wmi.Client) error {
nil,
)
c.throttleReasons = prometheus.NewDesc(
prometheus.BuildFQName(types2.Namespace, Name, "throttle_reasons"),
prometheus.BuildFQName(types.Namespace, Name, "throttle_reasons"),
"(ThrottleReasons)",
[]string{
"name",
@@ -92,7 +92,7 @@ func (c *Collector) Build(_ *slog.Logger, wmiClient *wmi.Client) error {
// Collect sends the metric values for each metric
// to the provided prometheus Metric channel.
func (c *Collector) Collect(_ *types2.ScrapeContext, logger *slog.Logger, ch chan<- prometheus.Metric) error {
func (c *Collector) Collect(_ *types.ScrapeContext, logger *slog.Logger, ch chan<- prometheus.Metric) error {
logger = logger.With(slog.String("collector", Name))
if err := c.collect(ch); err != nil {
logger.Error("failed collecting thermalzone metrics",