Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client is a struct that embedds the dynamic.Interface(dynamic client) and has Session as an attribute The session.Session attributes is passed all way down to the ResourceClient to keep track of the resources created by the dynamic client
func (*Client) Resource ¶
func (d *Client) Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface
Resource takes a schema.GroupVersionResource parameter to set the appropriate resource interface e.g.
schema.GroupVersionResource { Group: "management.cattle.io", Version: "v3", Resource: "users", }
type NamespaceableResourceClient ¶
type NamespaceableResourceClient struct { dynamic.NamespaceableResourceInterface // contains filtered or unexported fields }
NamespaceableResourceClient is a struct that has dynamic.NamespaceableResourceInterface embedded, and has session.Session as an attribute. This is inorder to overwrite dynamic.NamespaceableResourceInterface's Namespace function.
func (*NamespaceableResourceClient) Namespace ¶
func (d *NamespaceableResourceClient) Namespace(s string) dynamic.ResourceInterface
Namespace returns a dynamic.ResourceInterface that is embedded in ResourceClient, so ultimately its Create is overwritten.
type ResourceClient ¶
type ResourceClient struct { dynamic.ResourceInterface // contains filtered or unexported fields }
ResourceClient has dynamic.ResourceInterface embedded so dynamic.ResourceInterface's Create can be overwritten.
func (*ResourceClient) Create ¶
func (c *ResourceClient) Create(ctx context.Context, obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
Create is dynamic.ResourceInterface's Create function, that is being overwritten to register its delete function to the session.Session that is being reference.