@@ -18,7 +18,7 @@ type AgentLabels struct {
18
18
ControlNamespace string `json:"control-namespace"`
19
19
}
20
20
21
- // LabelCollectorConfig holds configuration parameters for LabelCollectorImpl .
21
+ // LabelCollectorConfig holds configuration parameters for LabelCollector .
22
22
type LabelCollectorConfig struct {
23
23
// K8sClientReader is a Kubernetes API client Reader.
24
24
K8sClientReader client.Reader
@@ -28,21 +28,21 @@ type LabelCollectorConfig struct {
28
28
PodNSName types.NamespacedName
29
29
}
30
30
31
- // LabelCollectorConfigImpl is an implementation of LabelCollectorConfig .
32
- type LabelCollectorConfigImpl struct {
31
+ // LabelCollector is an implementation of AgentLabelCollector .
32
+ type LabelCollector struct {
33
33
cfg LabelCollectorConfig
34
34
}
35
35
36
- // NewLabelCollectorConfigImpl creates a new LabelCollectorConfigImpl for a telemetry Job .
37
- func NewLabelCollectorConfigImpl (
36
+ // NewLabelCollector creates a new LabelCollector .
37
+ func NewLabelCollector (
38
38
cfg LabelCollectorConfig ,
39
- ) * LabelCollectorConfigImpl {
40
- return & LabelCollectorConfigImpl {
39
+ ) * LabelCollector {
40
+ return & LabelCollector {
41
41
cfg : cfg ,
42
42
}
43
43
}
44
44
45
- func (l * LabelCollectorConfigImpl ) Collect (ctx context.Context ) (AgentLabels , error ) {
45
+ func (l * LabelCollector ) Collect (ctx context.Context ) (AgentLabels , error ) {
46
46
clusterID , err := collectClusterID (ctx , l .cfg .K8sClientReader )
47
47
if err != nil {
48
48
return AgentLabels {}, fmt .Errorf ("failed to collect cluster information: %w" , err )
0 commit comments