client

package
v1.17.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppClient

type AppClient interface {
	Execute(cmd string, params []string) error
	Ping() error
}

AppClient client interface allowing to interact with a service or an application

type Client

type Client interface {
	Get() error
	Create() error
	Update() error
	Delete() error
}

Client Generic client type

type Kube

type Kube struct {
	//	context.Context
	client.Client
	client.Object
}

Kube client to address Kube resources

func NewKube

func NewKube(client client.Client, obj client.Object) *Kube

NewKube New client mapper /!\ The runtime object passed as argument is already IDENTIFIABLE so it must have its Namespace and name defined!!

func (*Kube) Create

func (c *Kube) Create() error

Create creates a resource

func (*Kube) Delete

func (c *Kube) Delete() error

Delete delete a resource

func (*Kube) Get

func (c *Kube) Get() error

Get creates a resource

func (*Kube) Update

func (c *Kube) Update() error

Update update a resource

type Status

type Status struct {
}

func (Status) Patch

func (s Status) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

func (Status) Update

func (s Status) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

type Test

type Test struct {
}

Test client to address tests needs.

func (*Test) Create

func (c *Test) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

Create creates a resource

func (*Test) Delete

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

Delete delete a resource

func (*Test) DeleteAllOf

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

func (*Test) Get

func (c *Test) Get(ctx context.Context, key types.NamespacedName, obj client.Object) error

Get a resource

func (Test) List

func (c Test) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

func (*Test) Patch

func (c *Test) Patch(ctx context.Context, obj client.Object, patch client.Patch, ops ...client.PatchOption) error

func (*Test) RESTMapper

func (c *Test) RESTMapper() meta.RESTMapper

func (*Test) Scheme

func (c *Test) Scheme() *runtime.Scheme

func (*Test) Status

func (c *Test) Status() client.StatusWriter

Status return a StatusWriter

func (*Test) Update

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

Update update a resource

Jump to

Keyboard shortcuts

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