Version: v0.0.0-...-d33a7d8 Latest Latest

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 16 Imported by: 107




This section is empty.


This section is empty.


func IsNamespaced

func IsNamespaced(gvr schema.GroupVersionResource, mapper meta.RESTMapper) (bool, error)


type Client

type Client struct {
	RESTClient rest.Interface

	Namespaced bool
	GVR        schema.GroupVersionResource
	// contains filtered or unexported fields

func NewClient

func NewClient(gvr schema.GroupVersionResource, kind string, namespaced bool, client rest.Interface, defaultTimeout time.Duration) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, namespace string, obj, result runtime.Object, opts metav1.CreateOptions) (err error)

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, namespace, name string, opts metav1.DeleteOptions) error

func (*Client) DeleteCollection

func (c *Client) DeleteCollection(ctx context.Context, namespace string, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, namespace, name string, result runtime.Object, options metav1.GetOptions) (err error)

func (*Client) List

func (c *Client) List(ctx context.Context, namespace string, result runtime.Object, opts metav1.ListOptions) (err error)

func (*Client) Patch

func (c *Client) Patch(ctx context.Context, namespace, name string, pt types.PatchType, data []byte, result runtime.Object, opts metav1.PatchOptions, subresources ...string) (err error)

func (*Client) Update

func (c *Client) Update(ctx context.Context, namespace string, obj, result runtime.Object, opts metav1.UpdateOptions) (err error)

func (*Client) UpdateStatus

func (c *Client) UpdateStatus(ctx context.Context, namespace string, obj, result runtime.Object, opts metav1.UpdateOptions) (err error)

func (*Client) Watch

func (c *Client) Watch(ctx context.Context, namespace string, opts metav1.ListOptions) (watch.Interface, error)

type SharedClientFactory

type SharedClientFactory interface {
	ForKind(gvk schema.GroupVersionKind) (*Client, error)
	ForResource(gvr schema.GroupVersionResource, namespaced bool) (*Client, error)
	ForResourceKind(gvr schema.GroupVersionResource, kind string, namespaced bool) *Client
	NewObjects(gvk schema.GroupVersionKind) (runtime.Object, runtime.Object, error)
	GVKForObject(obj runtime.Object) (schema.GroupVersionKind, error)
	GVKForResource(gvr schema.GroupVersionResource) (schema.GroupVersionKind, error)
	IsNamespaced(gvk schema.GroupVersionKind) (bool, error)
	ResourceForGVK(gvk schema.GroupVersionKind) (schema.GroupVersionResource, bool, error)
	IsHealthy(ctx context.Context) bool

func NewSharedClientFactory

func NewSharedClientFactory(config *rest.Config, opts *SharedClientFactoryOptions) (_ SharedClientFactory, err error)

func NewSharedClientFactoryForConfig

func NewSharedClientFactoryForConfig(config *rest.Config) (SharedClientFactory, error)

type SharedClientFactoryOptions

type SharedClientFactoryOptions struct {
	Mapper meta.RESTMapper
	Scheme *runtime.Scheme

Jump to

Keyboard shortcuts

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