Skip to content

Commit

Permalink
handlecount: rename handles package
Browse files Browse the repository at this point in the history
The `handles` package name actually clashed with a ton of other places
that had variables called `handles`. This commit renames the package to
`handlecount`.
  • Loading branch information
braydonk committed Jun 27, 2023
1 parent 57dbeb6 commit 4eefda7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 19 deletions.
12 changes: 1 addition & 11 deletions receiver/hostmetricsreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,14 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.80.0
github.com/shirou/gopsutil/v3 v3.23.5
github.com/stretchr/testify v1.8.4
<<<<<<< HEAD
github.com/yusufpapurcu/wmi v1.2.3
go.opentelemetry.io/collector v0.80.0
go.opentelemetry.io/collector/component v0.80.0
go.opentelemetry.io/collector/confmap v0.80.0
go.opentelemetry.io/collector/consumer v0.80.0
go.opentelemetry.io/collector/pdata v1.0.0-rcv0013
go.opentelemetry.io/collector/receiver v0.80.0
go.opentelemetry.io/collector/semconv v0.80.0
=======
github.com/yusufpapurcu/wmi v1.2.3
go.opentelemetry.io/collector v0.79.0
go.opentelemetry.io/collector/component v0.79.0
go.opentelemetry.io/collector/confmap v0.79.0
go.opentelemetry.io/collector/consumer v0.79.0
go.opentelemetry.io/collector/pdata v1.0.0-rcv0012
go.opentelemetry.io/collector/receiver v0.79.0
go.opentelemetry.io/collector/semconv v0.79.0
>>>>>>> a3ce3db1fd (run make gotidy)
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.24.0
golang.org/x/sys v0.9.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package handles // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handles"
package handlecount // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handlecount"

type Manager interface {
Refresh() error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//go:build !windows
// +build !windows

package handles // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handles"
package handlecount // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handlecount"

import "errors"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//go:build !windows
// +build !windows

package handles
package handlecount

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//go:build windows
// +build windows

package handles // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handles"
package handlecount // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handlecount"

import (
"errors"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//go:build windows
// +build windows

package handles
package handlecount

import (
"errors"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"go.opentelemetry.io/collector/receiver/scrapererror"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handles"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/handlecount"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/ucal"
)
Expand Down Expand Up @@ -51,7 +51,7 @@ type scraper struct {
getProcessCreateTime func(p processHandle) (int64, error)
getProcessHandles func() (processHandles, error)

handleCountManager handles.Manager
handleCountManager handlecount.Manager
}

// newProcessScraper creates a Process Scraper
Expand All @@ -63,7 +63,7 @@ func newProcessScraper(settings receiver.CreateSettings, cfg *Config) (*scraper,
getProcessHandles: getProcessHandlesInternal,
scrapeProcessDelay: cfg.ScrapeProcessDelay,
ucals: make(map[int32]*ucal.CPUUtilizationCalculator),
handleCountManager: handles.NewManager(),
handleCountManager: handlecount.NewManager(),
}

var err error
Expand Down

0 comments on commit 4eefda7

Please sign in to comment.