-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[haagent] Add agent group tag to datadog.agent.running
- Loading branch information
1 parent
af96a94
commit e3bd8e5
Showing
22 changed files
with
158 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// 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 2024-present Datadog, Inc. | ||
|
||
// Package noophaagent provides a noop haagent component | ||
package noophaagent | ||
|
||
import ( | ||
"go.uber.org/fx" | ||
|
||
log "github.com/DataDog/datadog-agent/comp/core/log/def" | ||
haagent "github.com/DataDog/datadog-agent/comp/haagent/def" | ||
"github.com/DataDog/datadog-agent/pkg/util/fxutil" | ||
) | ||
|
||
type noopHaAgent struct { | ||
Logger log.Component | ||
} | ||
|
||
func (m *noopHaAgent) GetGroup() string { return "" } | ||
|
||
func (m *noopHaAgent) Enabled() bool { return false } | ||
|
||
func (m *noopHaAgent) SetLeader(_ string) {} | ||
|
||
func (m *noopHaAgent) IsLeader() bool { return false } | ||
|
||
// Provides that defines the output of mocked snmpscan component | ||
type Provides struct { | ||
comp haagent.Component | ||
} | ||
|
||
// NewNoopHaAgent returns a new Mock | ||
func NewNoopHaAgent() haagent.Component { | ||
return &noopHaAgent{} | ||
} | ||
|
||
// Module defines the fx options for the noopHaAgent component. | ||
func Module() fxutil.Module { | ||
return fxutil.Component( | ||
fx.Provide(NewNoopHaAgent), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.