resource

package
v0.0.0-...-03b3356 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrResourceNotSupported = errors.New("resource is not supported")

Functions

This section is empty.

Types

type ResourceGetter

type ResourceGetter struct {
	// contains filtered or unexported fields
}

func NewResourceGetter

func NewResourceGetter(factory informers.InformerFactory) *ResourceGetter

func (*ResourceGetter) Get

func (r *ResourceGetter) Get(resource, namespace, name string) (runtime.Object, error)

func (*ResourceGetter) List

func (r *ResourceGetter) List(resource, namespace string, query *query.Query) (*api.ListResult, error)

func (*ResourceGetter) TryResource

func (r *ResourceGetter) TryResource(clusterScope bool, resource string) v1alpha3.Interface

TryResource will retrieve a getter with resource name, it doesn't guarantee find resource with correct group version need to refactor this use schema.GroupVersionResource

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL