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