Skip to content

Commit

Permalink
Make linters happy
Browse files Browse the repository at this point in the history
  • Loading branch information
lebauce committed Nov 18, 2024
1 parent 889f905 commit 73fe9af
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pkg/security/resolvers/resolvers_ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func NewEBPFResolvers(config *config.Config, manager *manager.Manager, statsdCli
return nil, err
}

tagsResolver := tags.NewResolver(config.Probe, telemetry, opts.Tagger, cgroupsResolver)
tagsResolver := tags.NewResolver(telemetry, opts.Tagger, cgroupsResolver)

userGroupResolver, err := usergroup.NewResolver(cgroupsResolver)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/security/resolvers/resolvers_ebpfless.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewEBPFLessResolvers(config *config.Config, statsdClient statsd.ClientInter
return nil, err
}

tagsResolver := tags.NewResolver(config.Probe, telemetry, opts.Tagger, cgroupsResolver)
tagsResolver := tags.NewResolver(telemetry, opts.Tagger, cgroupsResolver)
processOpts := process.NewResolverOpts()
processOpts.WithEnvsValue(config.Probe.EnvsWithValue)

Expand Down
2 changes: 1 addition & 1 deletion pkg/security/resolvers/resolvers_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func NewResolvers(config *config.Config, statsdClient statsd.ClientInterface, sc
return nil, err
}

tagsResolver := tags.NewResolver(config.Probe, telemetry, nil)
tagsResolver := tags.NewResolver(telemetry, nil)

userSessionsResolver, err := usersessions.NewResolver(config.RuntimeSecurity)
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions pkg/security/resolvers/tags/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/DataDog/datadog-agent/comp/core/telemetry"
"github.com/DataDog/datadog-agent/pkg/api/security"
pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup"
"github.com/DataDog/datadog-agent/pkg/security/probe/config"
"github.com/DataDog/datadog-agent/pkg/security/utils"
"github.com/DataDog/datadog-agent/pkg/util/log"
)
Expand Down Expand Up @@ -98,7 +97,7 @@ func (t *DefaultResolver) Stop() error {
}

// NewDefaultResolver returns a new default tags resolver
func NewDefaultResolver(config *config.Config, telemetry telemetry.Component, tagger Tagger) *DefaultResolver {
func NewDefaultResolver(telemetry telemetry.Component, tagger Tagger) *DefaultResolver {
ddConfig := pkgconfigsetup.Datadog()
resolver := &DefaultResolver{
tagger: tagger,
Expand Down
5 changes: 2 additions & 3 deletions pkg/security/resolvers/tags/resolver_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"time"

"github.com/DataDog/datadog-agent/comp/core/telemetry"
"github.com/DataDog/datadog-agent/pkg/security/probe/config"
"github.com/DataDog/datadog-agent/pkg/security/resolvers/cgroup"
cgroupModel "github.com/DataDog/datadog-agent/pkg/security/resolvers/cgroup/model"
"github.com/DataDog/datadog-agent/pkg/security/utils"
Expand Down Expand Up @@ -90,10 +89,10 @@ func (t *LinuxResolver) fetchTags(container *cgroupModel.CacheEntry) error {
}

// NewResolver returns a new tags resolver
func NewResolver(config *config.Config, telemetry telemetry.Component, tagger Tagger, cgroupsResolver *cgroup.Resolver) *LinuxResolver {
func NewResolver(telemetry telemetry.Component, tagger Tagger, cgroupsResolver *cgroup.Resolver) *LinuxResolver {
resolver := &LinuxResolver{
Notifier: utils.NewNotifier[Event, *cgroupModel.CacheEntry](),
DefaultResolver: NewDefaultResolver(config, telemetry, tagger),
DefaultResolver: NewDefaultResolver(telemetry, tagger),
workloadsWithoutTags: make(chan *cgroupModel.CacheEntry, 100),
cgroupResolver: cgroupsResolver,
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/security/resolvers/tags/resolver_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ package tags

import (
"github.com/DataDog/datadog-agent/comp/core/telemetry"
"github.com/DataDog/datadog-agent/pkg/security/probe/config"
)

// NewResolver returns a new tags resolver
func NewResolver(config *config.Config, telemetry telemetry.Component, tagger Tagger) Resolver {
return NewDefaultResolver(config, telemetry, tagger)
func NewResolver(telemetry telemetry.Component, tagger Tagger) Resolver {
return NewDefaultResolver(telemetry, tagger)
}

0 comments on commit 73fe9af

Please sign in to comment.