Skip to content

Commit

Permalink
Rename env/ to platform/ (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
rockdaboot committed Jul 10, 2024
1 parent 60ee6a4 commit b4c4485
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions hostmetadata/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"context"
"time"

"github.com/elastic/otel-profiling-agent/env"
"github.com/elastic/otel-profiling-agent/platform"
log "github.com/sirupsen/logrus"

"github.com/elastic/otel-profiling-agent/hostmetadata/agent"
Expand All @@ -30,11 +30,11 @@ type Collector struct {
customData map[string]string

// env is the environment object that provides information about the runtime environment.
env *env.Environment
env *platform.Environment
}

// NewCollector returns a new Collector for the specified collection agent endpoint.
func NewCollector(caEndpoint string, environment *env.Environment) *Collector {
func NewCollector(caEndpoint string, environment *platform.Environment) *Collector {
return &Collector{
caEndpoint: caEndpoint,
customData: make(map[string]string),
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
_ "net/http/pprof"

"github.com/elastic/otel-profiling-agent/containermetadata"
"github.com/elastic/otel-profiling-agent/env"
"github.com/elastic/otel-profiling-agent/platform"
"github.com/elastic/otel-profiling-agent/vc"
"golang.org/x/sys/unix"

Expand Down Expand Up @@ -136,7 +136,7 @@ func mainWithExitCode() exitCode {
log.Infof("Starting OTEL profiling agent %s (revision %s, build timestamp %s)",
vc.Version(), vc.Revision(), vc.BuildTimestamp())

environment, err := env.NewEnvironment(args.environmentType, args.machineID)
environment, err := platform.NewEnvironment(args.environmentType, args.machineID)
if err != nil {
log.Errorf("Failed to create environment: %v", err)
return exitFailure
Expand Down
2 changes: 1 addition & 1 deletion env/env.go → platform/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See the file "LICENSE" for details.
*/

package env
package platform

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion env/env_test.go → platform/platform_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package env
package platform

import (
"testing"
Expand Down

0 comments on commit b4c4485

Please sign in to comment.