dynamic

package
v0.0.0-...-351f9be Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewForConfig

func NewForConfig(ts *session.Session, inConfig *rest.Config) (dynamic.Interface, error)

NewForConfig creates a new dynamic client or returns an error.

Types

type Client

type Client struct {
	dynamic.Interface
	// contains filtered or unexported fields
}

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

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

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

Create is dynamic.ResourceInterface's Create function, that is being overwritten to register its delete function to the session.Session that is being reference.

Jump to

Keyboard shortcuts

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