cli

package
v0.0.0-...-cb42e1a Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	client.Client

	ScenarioId string
}

func New

func New(c client.Client, id string) Cli

func (*Cli) Create

func (c *Cli) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) 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.

func (*Cli) Delete

func (c *Cli) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

Delete deletes the given obj from Kubernetes cluster.

func (*Cli) DeleteAllOf

func (c *Cli) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

DeleteAllOf deletes all objects of the given type matching the given options. Deprecated: Use c.Client.DeleteAllOf directly. This function is needed for using this struct in controllerutil.CreateOrUpdate.

func (*Cli) EnsurePrefix

func (c *Cli) EnsurePrefix(name string) string

func (*Cli) Get

func (c *Cli) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error

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.

func (*Cli) HasScenarioPrefix

func (c *Cli) HasScenarioPrefix(name string) bool

func (*Cli) List

func (c *Cli) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) 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. Deprecated: Use c.Client.List directly. This function is needed for using this struct in controllerutil.CreateOrUpdate.

func (*Cli) Patch

func (c *Cli) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) 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.

func (*Cli) Update

func (c *Cli) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

Update updates 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.

Jump to

Keyboard shortcuts

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