kubernetes/staging/src/k8s.io/client-go/listers/generic_helpers.go

type ResourceIndexer

// New returns a new instance of a lister (resource indexer) wrapping the given indexer and resource for the specified type.
// This is intended for use by listers (generated by lister-gen) only.
func New[T runtime.Object](indexer cache.Indexer, resource schema.GroupResource) ResourceIndexer[T] {}

// NewNamespaced returns a new instance of a namespaced lister (resource indexer) wrapping the given parent and namespace for the specified type.
// This is intended for use by listers (generated by lister-gen) only.
func NewNamespaced[T runtime.Object](parent ResourceIndexer[T], namespace string) ResourceIndexer[T] {}

// List lists all resources in the indexer matching the given selector.
func (l ResourceIndexer[T]) List(selector labels.Selector) (ret []T, err error) {}

// Get retrieves the resource from the index for a given name.
func (l ResourceIndexer[T]) Get(name string) (T, error) {}