Documentation
¶
Index ¶
- func ColouredName(key ctrlclient.ObjectKey, color *color.Color) string
- func Name(key ctrlclient.ObjectKey) string
- func Namespace(name string) corev1.Namespace
- func ObjectKey(obj metav1.Object) ctrlclient.ObjectKey
- func PatchObject(actual, expected runtime.Object) (runtime.Object, error)
- func Pet() string
- func PetNamespace() corev1.Namespace
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColouredName ¶ added in v0.0.2
func ColouredName(key ctrlclient.ObjectKey, color *color.Color) string
func PatchObject ¶
func PatchObject(actual, expected runtime.Object) (runtime.Object, error)
func PetNamespace ¶
func PetNamespace() corev1.Namespace
Types ¶
type Client ¶
type Client interface {
// Get retrieves an obj for the given object key from the Kubernetes Cluster.
// obj must be a struct pointer so that obj can be updated with the response
// returned by the Server.
Get(ctx context.Context, key ctrlclient.ObjectKey, obj ctrlclient.Object, opts ...ctrlclient.GetOption) error
// List retrieves list of objects for a given namespace and list options. On a
// successful call, Items field in the list will be populated with the
// result returned from the server.
List(ctx context.Context, list ctrlclient.ObjectList, opts ...ctrlclient.ListOption) error
// Create saves the object obj in the Kubernetes cluster. obj must be a
// struct pointer so that obj can be updated with the content returned by the Server.
Create(ctx context.Context, obj ctrlclient.Object, opts ...ctrlclient.CreateOption) error
// Delete deletes the given obj from Kubernetes cluster.
Delete(ctx context.Context, obj ctrlclient.Object, opts ...ctrlclient.DeleteOption) error
// Patch patches the given obj in the Kubernetes cluster. obj must be a
// struct pointer so that obj can be updated with the content returned by the Server.
Patch(ctx context.Context, obj ctrlclient.Object, patch ctrlclient.Patch, opts ...ctrlclient.PatchOption) error
// IsObjectNamespaced returns true if the GroupVersionKind of the object is namespaced.
IsObjectNamespaced(obj runtime.Object) (bool, error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.