client

package
v0.0.0-...-2d9dd87 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package client defines Client for operating on resource groups.

The implementation is derived from sigs.k8s.io/controller-runtime/pkg/client and the main difference is that only interfaces are defined.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Reader
	Writer
}

Client knows how to perform CRUD operations on resources in a resource group.

type Reader

type Reader interface {
	// Get retrieves a resource for the given object key.
	Get(ctx context.Context, key client.ObjectKey, obj client.Object) error

	// List retrieves list of objects for a given namespace and list options.
	List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
}

Reader knows how to read and list resources in a resource group.

type Writer

type Writer interface {
	// Create saves a resource in a resource group.
	Create(ctx context.Context, obj client.Object) error

	// Delete deletes a resource from a resource group.
	Delete(ctx context.Context, obj client.Object) error

	// Update updates a resource in a resource group.
	Update(ctx context.Context, obj client.Object) error

	// Patch patches a resource in a resource group.
	Patch(ctx context.Context, obj client.Object, patch client.Patch) error
}

Writer knows how to create, delete, and update resources in a resource group.

Jump to

Keyboard shortcuts

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