Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
GetClient(obj *unstructured.Unstructured) (ResourceClient, error)
}
Client returns a client from a given unstructured object. It can be used when creating an object from a yaml file.
type ResourceClient ¶
type ResourceClient interface { Get(ctx context.Context, name string, options metav1.GetOptions) (*unstructured.Unstructured, error) Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions) (*unstructured.Unstructured, error) Delete(ctx context.Context, name string, options metav1.DeleteOptions) error }
ResourceClient is an interface that can be used for *K8sObjectWithRetry helper functions. In the original dynamic client, each method supports actions over subresources, which typed clients don't. Because of the difference, it needs to be wrapped with a new interface to be used in the helper functions. cf. https://pkg.go.dev/k8s.io/client-go/dynamic#ResourceInterface
Click to show internal directories.
Click to hide internal directories.