client

package
Version: v0.25.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 21 Imported by: 36

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterMetadata

func ClusterMetadata(c client.Reader) (*kmapi.ClusterMetadata, error)

func ClusterUID

func ClusterUID(c client.Reader) (string, error)

func CreateOrPatch

func CreateOrPatch(ctx context.Context, c client.Client, obj client.Object, transform TransformFunc, opts ...client.PatchOption) (client.Object, kutil.VerbType, error)

func NewClient

func NewClient(cache cache.Cache, config *restclient.Config, options client.Options, uncachedObjects ...client.Object) (client.Client, error)

func NewDelegatingClient

func NewDelegatingClient(in NewDelegatingClientInput) (client.Client, error)

NewDelegatingClient creates a new delegating client.

A delegating client forms a Client by composing separate reader, writer and statusclient interfaces. This way, you can have an Client that reads from a cache and writes to the API server.

func NewUncachedClient

func NewUncachedClient(cfg *rest.Config, funcs ...func(*runtime.Scheme) error) (client.Client, error)

Types

type NewDelegatingClientInput

type NewDelegatingClientInput struct {
	CacheReader       client.Reader
	Client            client.Client
	UncachedObjects   []client.Object
	CacheUnstructured bool
	Cachable          apiutil2.Cachable
}

NewDelegatingClientInput encapsulates the input parameters to create a new delegating client.

type TransformFunc

type TransformFunc func(obj client.Object, createOp bool) client.Object

type TransformStatusFunc added in v0.24.2

type TransformStatusFunc func(obj client.Object) client.Object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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