Documentation ¶
Overview ¶
Package dynamic provides a client interface to arbitrary Kubernetes APIs that exposes common high level operations and exposes common metadata.
Index ¶
- type Client
- type ResourceClient
- func (rc *ResourceClient) Create(obj *runtime.Unstructured) (*runtime.Unstructured, error)
- func (rc *ResourceClient) Delete(name string, opts *v1.DeleteOptions) error
- func (rc *ResourceClient) DeleteCollection(deleteOptions *v1.DeleteOptions, listOptions v1.ListOptions) error
- func (rc *ResourceClient) Get(name string) (*runtime.Unstructured, error)
- func (rc *ResourceClient) List(opts v1.ListOptions) (*runtime.UnstructuredList, error)
- func (rc *ResourceClient) Update(obj *runtime.Unstructured) (*runtime.Unstructured, error)
- func (rc *ResourceClient) Watch(opts v1.ListOptions) (watch.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Kubernetes client that allows you to access metadata and manipulate metadata of a Kubernetes API group.
func NewClient ¶
NewClient returns a new client based on the passed in config. The codec is ignored, as the dynamic client uses it's own codec.
func (*Client) Resource ¶
func (c *Client) Resource(resource *unversioned.APIResource, namespace string) *ResourceClient
Resource returns an API interface to the specified resource for this client's group and version. If resource is not a namespaced resource, then namespace is ignored.
type ResourceClient ¶
type ResourceClient struct {
// contains filtered or unexported fields
}
ResourceClient is an API interface to a specific resource under a dynamic client.
func (*ResourceClient) Create ¶
func (rc *ResourceClient) Create(obj *runtime.Unstructured) (*runtime.Unstructured, error)
Create creates the provided resource.
func (*ResourceClient) Delete ¶
func (rc *ResourceClient) Delete(name string, opts *v1.DeleteOptions) error
Delete deletes the resource with the specified name.
func (*ResourceClient) DeleteCollection ¶
func (rc *ResourceClient) DeleteCollection(deleteOptions *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection deletes a collection of objects.
func (*ResourceClient) Get ¶
func (rc *ResourceClient) Get(name string) (*runtime.Unstructured, error)
Get gets the resource with the specified name.
func (*ResourceClient) List ¶
func (rc *ResourceClient) List(opts v1.ListOptions) (*runtime.UnstructuredList, error)
List returns a list of objects for this resource.
func (*ResourceClient) Update ¶
func (rc *ResourceClient) Update(obj *runtime.Unstructured) (*runtime.Unstructured, error)
Update updates the provided resource.
func (*ResourceClient) Watch ¶
func (rc *ResourceClient) Watch(opts v1.ListOptions) (watch.Interface, error)
Watch returns a watch.Interface that watches the resource.