Documentation ¶
Index ¶
- func SetInstance(i Ops)
- type Client
- func (c *Client) GetObject(object runtime.Object) (runtime.Object, error)
- func (c *Client) ListObjects(options *metav1.ListOptions, namespace string) (*unstructured.UnstructuredList, error)
- func (c *Client) SetConfig(cfg *rest.Config)
- func (c *Client) UpdateObject(object runtime.Object) (runtime.Object, error)
- type Ops
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetInstance ¶
func SetInstance(i Ops)
SetInstance replaces the instance with the provided one. Should be used only for testing purposes.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper for the kubernetes dynamic client.
func NewForConfig ¶
NewForConfig builds a new client for the given config.
func (*Client) ListObjects ¶
func (c *Client) ListObjects(options *metav1.ListOptions, namespace string) (*unstructured.UnstructuredList, error)
ListObjects returns a list of generic Objects using the options
type Ops ¶
type Ops interface { // GetObject returns the latest object given a generic Object GetObject(object runtime.Object) (runtime.Object, error) // UpdateObject updates a generic Object UpdateObject(object runtime.Object) (runtime.Object, error) // ListObjects returns a list of generic Objects using the options ListObjects(options *metav1.ListOptions, namespace string) (*unstructured.UnstructuredList, error) // SetConfig sets the config and resets the client SetConfig(config *rest.Config) }
Ops is an interface to perform generic Object operations
func NewInstanceFromConfigFile ¶
NewInstanceFromConfigFile returns new instance of client by using given config file
Click to show internal directories.
Click to hide internal directories.