Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFakeDiscoveryClient ¶ added in v0.4.0
func NewFakeDiscoveryClient(registeredResources []schema.GroupVersionResource) *fakeDiscoveryClient
NewFakeDiscoveryClient returns a fakediscovery client
Types ¶
type IDiscovery ¶ added in v0.4.0
type IDiscovery interface { FindResource(apiVersion string, kind string) (*metav1.APIResource, schema.GroupVersionResource, error) GetGVRFromKind(kind string) (schema.GroupVersionResource, error) GetGVRFromAPIVersionKind(apiVersion string, kind string) schema.GroupVersionResource GetServerVersion() (*version.Info, error) OpenAPISchema() (*openapiv2.Document, error) DiscoveryCache() discovery.CachedDiscoveryInterface }
IDiscovery provides interface to mange Kind and GVR mapping
type Interface ¶ added in v1.7.0
type Interface interface { time.Duration) dynamicinformer.DynamicSharedInformerFactory // GetEventsInterface provides typed interface for events GetEventsInterface() (corev1.EventInterface, error) // GetCSRInterface provides type interface for CSR GetCSRInterface() (certsv1beta1.CertificateSigningRequestInterface, error) // GetDynamicInterface fetches underlying dynamic interface GetDynamicInterface() dynamic.Interface // Discovery return the discovery client implementation Discovery() IDiscovery // SetDiscovery sets the discovery client implementation SetDiscovery(discoveryClient IDiscovery) // GetResource returns the resource in unstructured/json format GetResource(apiVersion string, kind string, namespace string, name string, subresources ...string) (*unstructured.Unstructured, error) // PatchResource patches the resource PatchResource(apiVersion string, kind string, namespace string, name string, patch []byte) (*unstructured.Unstructured, error) // ListResource returns the list of resources in unstructured/json format // Access items using []Items ListResource(apiVersion string, kind string, namespace string, lselector *metav1.LabelSelector) (*unstructured.UnstructuredList, error) // DeleteResource deletes the specified resource DeleteResource(apiVersion string, kind string, namespace string, name string, dryRun bool) error // CreateResource creates object for the specified resource/namespace CreateResource(apiVersion string, kind string, namespace string, obj interface{}, dryRun bool) (*unstructured.Unstructured, error) // UpdateResource updates object for the specified resource/namespace UpdateResource(apiVersion string, kind string, namespace string, obj interface{}, dryRun bool) (*unstructured.Unstructured, error) // UpdateStatusResource updates the resource "status" subresource UpdateStatusResource(apiVersion string, kind string, namespace string, obj interface{}, dryRun bool) (*unstructured.Unstructured, error) }NewDynamicSharedInformerFactory(
Click to show internal directories.
Click to hide internal directories.