From adc9151f7e17c169e879f2a8534ff20ab07062f0 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 c3754b60d4..6174073802 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 605169d1b3..dd867f88c7 100644 --- a/pkg/cache/v3/status.go +++ b/pkg/cache/v3/status.go @@ -103,10 +103,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