client

package
v0.30.21 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 28 Imported by: 77

Documentation

Index

Constants

View Source
const (
	RetryTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

func BuildTypeMap added in v0.29.0

func CreateOrPatch

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

func GetServiceAccountTokenSecret added in v0.25.36

func GetServiceAccountTokenSecret(kc client.Client, sa client.ObjectKey) (*core.Secret, error)

func NewAutoConvertClient added in v0.29.0

func NewAutoConvertClient(gvks ...schema.GroupVersionKind) client.NewClientFunc

func NewClient

func NewClient(config *restclient.Config, options client.Options) (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 NewRetryClient added in v0.30.12

func NewRetryClient(d client.Client) client.Client

func NewRetryClientWithOptions added in v0.30.12

func NewRetryClientWithOptions(d client.Client, interval time.Duration, timeout time.Duration) client.Client

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