diff --git a/pkg/compliance/reporter.go b/pkg/compliance/reporter.go index 9f9fd87710571..2561788c6aaa4 100644 --- a/pkg/compliance/reporter.go +++ b/pkg/compliance/reporter.go @@ -12,7 +12,6 @@ import ( "time" "github.com/DataDog/datadog-agent/comp/core/hostname/hostnameimpl" - "github.com/DataDog/datadog-agent/comp/logs/agent/agentimpl" "github.com/DataDog/datadog-agent/comp/logs/agent/config" logscompression "github.com/DataDog/datadog-agent/comp/serializer/logscompression/def" pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" @@ -45,7 +44,7 @@ func NewLogReporter(hostname string, sourceName, sourceType string, endpoints *c auditor.Start() // setup the pipeline provider that provides pairs of processor and sender - pipelineProvider := pipeline.NewProvider(4, auditor, &diagnostic.NoopMessageReceiver{}, nil, endpoints, dstcontext, agentimpl.NewStatusProvider(), hostnameimpl.NewHostnameService(), pkgconfigsetup.Datadog(), compression) + pipelineProvider := pipeline.NewProvider(4, auditor, &diagnostic.NoopMessageReceiver{}, nil, endpoints, dstcontext, &common.NoopStatusProvider{}, hostnameimpl.NewHostnameService(), pkgconfigsetup.Datadog(), compression) pipelineProvider.Start() logSource := sources.NewLogSource( diff --git a/pkg/security/common/status_provider.go b/pkg/security/common/status_provider.go new file mode 100644 index 0000000000000..8d2189f479928 --- /dev/null +++ b/pkg/security/common/status_provider.go @@ -0,0 +1,15 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +package common + +// NoopStatusProvider is a no-op implementation of the StatusProvider interface +type NoopStatusProvider struct{} + +// AddGlobalWarning is a no-op implementation of the StatusProvider interface +func (n *NoopStatusProvider) AddGlobalWarning(string, string) {} + +// RemoveGlobalWarning is a no-op implementation of the StatusProvider interface +func (n *NoopStatusProvider) RemoveGlobalWarning(string) {} diff --git a/pkg/security/reporter/reporter.go b/pkg/security/reporter/reporter.go index 49ebfbf900aa0..a9fe090cff9c7 100644 --- a/pkg/security/reporter/reporter.go +++ b/pkg/security/reporter/reporter.go @@ -10,7 +10,6 @@ import ( "time" "github.com/DataDog/datadog-agent/comp/core/hostname/hostnameimpl" - "github.com/DataDog/datadog-agent/comp/logs/agent/agentimpl" logsconfig "github.com/DataDog/datadog-agent/comp/logs/agent/config" compression "github.com/DataDog/datadog-agent/comp/serializer/logscompression/def" pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" @@ -53,7 +52,7 @@ func newReporter(hostname string, stopper startstop.Stopper, sourceName, sourceT stopper.Add(auditor) // setup the pipeline provider that provides pairs of processor and sender - pipelineProvider := pipeline.NewProvider(4, auditor, &diagnostic.NoopMessageReceiver{}, nil, endpoints, context, agentimpl.NewStatusProvider(), hostnameimpl.NewHostnameService(), pkgconfigsetup.Datadog(), compression) + pipelineProvider := pipeline.NewProvider(4, auditor, &diagnostic.NoopMessageReceiver{}, nil, endpoints, context, &seccommon.NoopStatusProvider{}, hostnameimpl.NewHostnameService(), pkgconfigsetup.Datadog(), compression) pipelineProvider.Start() stopper.Add(pipelineProvider)