Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFakeDiscoveryClient ¶
func NewFakeDiscoveryClient(registeredResources []schema.GroupVersionResource) *fakeDiscoveryClient
NewFakeDiscoveryClient returns a fakediscovery client
Types ¶
type IDiscovery ¶
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 DiscoveryInterface() discovery.DiscoveryInterface }
IDiscovery provides interface to mange Kind and GVR mapping
type Interface ¶
type Interface interface { time.Duration) dynamicinformer.DynamicSharedInformerFactory // GetEventsInterface provides typed interface for events GetEventsInterface() (corev1.EventInterface, 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) RawAbsPath(path string) ([]byte, error) // 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) // RecordClientQuery publish the client query to the metric RecordClientQuery(clientQueryOperation metrics.ClientQueryOperation, clientType metrics.ClientType, resourceKind string, resourceNamespace string) }NewDynamicSharedInformerFactory(
func NewClient ¶
func NewClient(config *rest.Config, kclient *kubernetes.Clientset, metricsConfig metrics.MetricsConfigManager, resync time.Duration, stopCh <-chan struct{}) (Interface, error)
NewClient creates new instance of client
func NewEmptyFakeClient ¶
func NewEmptyFakeClient() Interface
Click to show internal directories.
Click to hide internal directories.