From 1a049e95070a3d5316a689c56b4b80191aa94f55 Mon Sep 17 00:00:00 2001 From: Valerian Roche Date: Tue, 1 Nov 2022 17:44:11 -0400 Subject: [PATCH] Reword comments on new ClientState and watch methods Signed-off-by: Valerian Roche --- pkg/cache/v3/cache.go | 4 ++-- pkg/cache/v3/status.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/cache/v3/cache.go b/pkg/cache/v3/cache.go index be124cb484..d4030dba46 100644 --- a/pkg/cache/v3/cache.go +++ b/pkg/cache/v3/cache.go @@ -48,8 +48,8 @@ type ClientState interface { GetKnownResources() map[string]string // GetSubscribedResources returns the list of resources currently subscribed to by the client for the type. - // For delta it keeps track across requests - // For sotw it is a normalized view of the request resources + // For delta it keeps track of subscription updates across requests + // For sotw it is a normalized view of the last request resources GetSubscribedResources() map[string]struct{} // IsWildcard returns whether the client has a wildcard watch. diff --git a/pkg/cache/v3/status.go b/pkg/cache/v3/status.go index 43c6d109db..ba2477ab3e 100644 --- a/pkg/cache/v3/status.go +++ b/pkg/cache/v3/status.go @@ -101,10 +101,10 @@ type DeltaResponseWatch struct { clientState ClientState } -// WatchesResources returns whether at least one of the resource provided is currently watch by the stream -// It is currently only applicable to delta-xds -// If the request is wildcard, it will always return true -// Otherwise it will compare the provided resources to the list of resources currently subscribed +// WatchesResources returns whether at least one of the resources provided is currently being watched by the stream. +// It is currently only applicable to delta-xds. +// If the request is wildcard, it will always return true, +// otherwise it will compare the provided resources to the list of resources currently subscribed func (w *DeltaResponseWatch) WatchesResources(resourceNames map[string]struct{}) bool { if w.clientState.IsWildcard() { return true