client

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Overview

Package client telemetrypolicy/api/client provides an interface to interact with Policy CRD through a custom Client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRest

func NewRest(config rest.Config) (*rest.RESTClient, *runtime.Scheme, error)

NewRest returns a Kubernetes Rest client to access the Telemetry Policy CRD.

Types

type Client

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

Client holds the information needed to query telemetry policies from the kubernetes API.

func New

func New(config rest.Config, namespace string) (*Client, error)

New returns a rest client that specifically returns a namespaced client to retrieve Telemetry Policy from the API.

func (*Client) Create

Create sends the given object to the API server to register it as a new Telemetry Policy.

func (*Client) Delete

func (client *Client) Delete(name string, options *metav1.DeleteOptions) error

Delete removes a telemetry policy of the given name, with the passed options, from Kubernetes.

func (*Client) Get

func (client *Client) Get(name string, namespace string) (*telemetrypolicy.TASPolicy, error)

Get returns the full information from the named Telemetry Policy.

func (*Client) List

func (client *Client) List(options metav1.ListOptions) (*telemetrypolicy.TASPolicyList, error)

List returns a list of Telemetry Policy that meet the conditions set forward in the options argument.

func (*Client) NewListWatch

func (client *Client) NewListWatch() *cache.ListWatch

NewListWatch creates a watcher on the CRD.

func (*Client) Update

Update changes the information contained in a given Telemetry Policy.

Jump to

Keyboard shortcuts

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