Skip to content

Commit 7dda8cf

Browse files
author
Kate Osborn
committed
Unexport telemetry methods
1 parent a5452bf commit 7dda8cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/mode/static/telemetry/collector.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (c DataCollectorImpl) Collect(ctx context.Context) (Data, error) {
148148
return Data{}, fmt.Errorf("failed to collect NGF resource counts: %w", err)
149149
}
150150

151-
replicaSet, err := GetPodReplicaSet(ctx, c.cfg.K8sClientReader, c.cfg.PodNSName)
151+
replicaSet, err := getPodReplicaSet(ctx, c.cfg.K8sClientReader, c.cfg.PodNSName)
152152
if err != nil {
153153
return Data{}, fmt.Errorf("failed to get replica set for pod %v: %w", c.cfg.PodNSName, err)
154154
}
@@ -158,7 +158,7 @@ func (c DataCollectorImpl) Collect(ctx context.Context) (Data, error) {
158158
return Data{}, fmt.Errorf("failed to collect NGF replica count: %w", err)
159159
}
160160

161-
deploymentID, err := GetDeploymentID(replicaSet)
161+
deploymentID, err := getDeploymentID(replicaSet)
162162
if err != nil {
163163
return Data{}, fmt.Errorf("failed to get NGF deploymentID: %w", err)
164164
}
@@ -280,8 +280,8 @@ func computeRouteCount(
280280
}
281281
}
282282

283-
// GetPodReplicaSet returns the replicaset for the provided Pod.
284-
func GetPodReplicaSet(
283+
// getPodReplicaSet returns the replicaset for the provided Pod.
284+
func getPodReplicaSet(
285285
ctx context.Context,
286286
k8sClient client.Reader,
287287
podNSName types.NamespacedName,
@@ -324,8 +324,8 @@ func getReplicas(replicaSet *appsv1.ReplicaSet) (int, error) {
324324
return int(*replicaSet.Spec.Replicas), nil
325325
}
326326

327-
// GetDeploymentID gets the deployment ID of the provided ReplicaSet.
328-
func GetDeploymentID(replicaSet *appsv1.ReplicaSet) (string, error) {
327+
// getDeploymentID gets the deployment ID of the provided ReplicaSet.
328+
func getDeploymentID(replicaSet *appsv1.ReplicaSet) (string, error) {
329329
replicaOwnerRefs := replicaSet.GetOwnerReferences()
330330
if len(replicaOwnerRefs) != 1 {
331331
return "", fmt.Errorf("expected one owner reference of the NGF ReplicaSet, got %d", len(replicaOwnerRefs))

0 commit comments

Comments
 (0)