Documentation ¶
Overview ¶
Package cache includes controller caches.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericCache ¶
GenericCache wraps a client.Reader to add a single convenience method, UnstructuredList, that returns a slice of *unstructured.Unstructured.
func NewGenericResourceCache ¶
func NewGenericResourceCache(reader client.Reader) *GenericCache
NewGenericResourceCache returns a new GenericCache.
func (*GenericCache) UnstructuredList ¶
func (c *GenericCache) UnstructuredList(ctx context.Context, gvk schema.GroupVersionKind, opts ...client.ListOption) ([]*unstructured.Unstructured, error)
UnstructuredList returns all the resources in the cluster of the given GroupVersionKind for the given namespace. If the namespace is empty, it will return all resources across all namespaces. Namespace should always be set to empty when listing cluster-scoped resources. This method is needed because cache.Cache's List method requires knowing the type of the resource you wanted to list. We always want to return Unstructureds when listing resources on the cluster, whether it's a native or custom resource.