generic

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache added in v0.4.0

func NewCache(config *rest.Config, options ...func(*Options)) (cache.Cache, error)

NewCache returns a controller-runtime cache client implementation.

func NewClient

func NewClient(config *rest.Config, options ...func(*Options)) (client.Client, error)

NewClient returns a controller-runtime generic Client implementation.

func WithCacheReader

func WithCacheReader(cacheReader bool) func(opts *Options)

WithCacheReader sets whether to use the cache reader. The default value is true.

func WithContext

func WithContext(ctx context.Context) func(opts *Options)

WithContext sets the context for the client. The default value is context.Background().

func WithHTTPClient added in v0.4.0

func WithHTTPClient(httpClient *http.Client) func(opts *Options)

WithHTTPClient sets the HTTPClient for the client.

func WithMapper added in v0.4.0

func WithMapper(mapper meta.RESTMapper) func(opts *Options)

WithMapper sets the Mapper for the client.

func WithScheme

func WithScheme(scheme *runtime.Scheme) func(opts *Options)

WithScheme sets the custom scheme for the client. The default value is Kubernetes scheme.

func WithSyncPeriod added in v0.3.0

func WithSyncPeriod(syncPeriod *time.Duration) func(opts *Options)

WithSyncPeriod sets the SyncPeriod time option. The default value is nil.

Types

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options defines options needed to generate a client.

Jump to

Keyboard shortcuts

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