diff --git a/pkg/cache/v3/cache.go b/pkg/cache/v3/cache.go index be124cb48..d4030dba4 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 43c6d109d..ba2477ab3 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