Skip to content

Commit 4b097b3

Browse files
committed
Change name to LabelCollector
1 parent d0db145 commit 4b097b3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

internal/controller/provisioner/provisioner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var apiChecker openshift.APIChecker = &openshift.APICheckerImpl{}
7979
var labelCollectorFactory func(mgr manager.Manager, cfg Config) AgentLabelCollector = defaultLabelCollectorFactory
8080

8181
func defaultLabelCollectorFactory(mgr manager.Manager, cfg Config) AgentLabelCollector {
82-
return telemetry.NewLabelCollectorConfigImpl(telemetry.LabelCollectorConfig{
82+
return telemetry.NewLabelCollector(telemetry.LabelCollectorConfig{
8383
K8sClientReader: mgr.GetAPIReader(),
8484
Version: cfg.GatewayPodConfig.Version,
8585
PodNSName: types.NamespacedName{

internal/controller/telemetry/agent_labels.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type AgentLabels struct {
1818
ControlNamespace string `json:"control-namespace"`
1919
}
2020

21-
// LabelCollectorConfig holds configuration parameters for LabelCollectorImpl.
21+
// LabelCollectorConfig holds configuration parameters for LabelCollector.
2222
type LabelCollectorConfig struct {
2323
// K8sClientReader is a Kubernetes API client Reader.
2424
K8sClientReader client.Reader
@@ -28,21 +28,21 @@ type LabelCollectorConfig struct {
2828
PodNSName types.NamespacedName
2929
}
3030

31-
// LabelCollectorConfigImpl is an implementation of LabelCollectorConfig.
32-
type LabelCollectorConfigImpl struct {
31+
// LabelCollector is an implementation of AgentLabelCollector.
32+
type LabelCollector struct {
3333
cfg LabelCollectorConfig
3434
}
3535

36-
// NewLabelCollectorConfigImpl creates a new LabelCollectorConfigImpl for a telemetry Job.
37-
func NewLabelCollectorConfigImpl(
36+
// NewLabelCollector creates a new LabelCollector.
37+
func NewLabelCollector(
3838
cfg LabelCollectorConfig,
39-
) *LabelCollectorConfigImpl {
40-
return &LabelCollectorConfigImpl{
39+
) *LabelCollector {
40+
return &LabelCollector{
4141
cfg: cfg,
4242
}
4343
}
4444

45-
func (l *LabelCollectorConfigImpl) Collect(ctx context.Context) (AgentLabels, error) {
45+
func (l *LabelCollector) Collect(ctx context.Context) (AgentLabels, error) {
4646
clusterID, err := collectClusterID(ctx, l.cfg.K8sClientReader)
4747
if err != nil {
4848
return AgentLabels{}, fmt.Errorf("failed to collect cluster information: %w", err)

0 commit comments

Comments
 (0)