client

package
v0.0.0-...-dfb2727 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNamespaced

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

Types

type Client

type Client struct {
	RESTClient rest.Interface

	Namespaced bool
	GVR        schema.GroupVersionResource

	Ctx        context.Context
	Kubernetes kubernetes.Interface
	Config     rest.Config
	// 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)

Jump to

Keyboard shortcuts

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