Documentation ¶
Overview ¶
Package client telemetrypolicy/api/client provides an interface to interact with Policy CRD through a custom Client.
Index ¶
- func NewRest(config rest.Config) (*rest.RESTClient, *runtime.Scheme, error)
- type Client
- func (client *Client) Create(obj *telemetrypolicy.TASPolicy) (*telemetrypolicy.TASPolicy, error)
- func (client *Client) Delete(name string, options *metav1.DeleteOptions) error
- func (client *Client) Get(name string, namespace string) (*telemetrypolicy.TASPolicy, error)
- func (client *Client) List(options metav1.ListOptions) (*telemetrypolicy.TASPolicyList, error)
- func (client *Client) NewListWatch() *cache.ListWatch
- func (client *Client) Update(obj *telemetrypolicy.TASPolicy) (*telemetrypolicy.TASPolicy, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
New returns a rest client that specifically returns a namespaced client to retrieve Telemetry Policy from the API.
func (*Client) Create ¶
func (client *Client) Create(obj *telemetrypolicy.TASPolicy) (*telemetrypolicy.TASPolicy, error)
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) 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 ¶
NewListWatch creates a watcher on the CRD.
func (*Client) Update ¶
func (client *Client) Update(obj *telemetrypolicy.TASPolicy) (*telemetrypolicy.TASPolicy, error)
Update changes the information contained in a given Telemetry Policy.