Skip to content

Commit a2ddb16

Browse files
committed
nrt: cache: clarify GetCachedNRTCopy API
clarify the return values of the API purpose and meaning. Signed-off-by: Francesco Romani <[email protected]>
1 parent ffba3d3 commit a2ddb16

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/noderesourcetopology/cache/cache.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ type Interface interface {
3030
// Over-reserved resources are the resources consumed by pods scheduled to that node after the last update
3131
// of NRT pertaining to the same node, pessimistically overallocated on ALL the NUMA zones of the node.
3232
// The pod argument is used only for logging purposes.
33-
// Returns a boolean to signal the caller if the NRT data is clean. If false, then the node has foreign
34-
// Pods detected - so it should be ignored or handled differently by the caller.
33+
// Returns nil if there is no NRT data available for the node named `nodeName`.
34+
// Returns a boolean to signal the caller if the NRT data is fresh.
35+
// If true, the data is fresh and ready to be consumed.
36+
// If false, the data is stale and the caller need to wait for a future refresh.
3537
GetCachedNRTCopy(ctx context.Context, nodeName string, pod *corev1.Pod) (*topologyv1alpha2.NodeResourceTopology, bool)
3638

3739
// NodeMaybeOverReserved declares a node was filtered out for not enough resources available.

0 commit comments

Comments
 (0)