generic

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 12 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 WithByObject added in v0.6.0

func WithByObject(byObject map[client.Object]cache.ByObject) func(opts *Options)

WithByObject sets the ByObject for the cache client.

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 WithDefaultNamespaces added in v0.6.0

func WithDefaultNamespaces(defaultNamespaces map[string]cache.Config) func(opts *Options)

WithDefaultNamespaces sets the DefaultNamespaces for the cache client.

func WithDefaultTransform added in v0.6.0

func WithDefaultTransform(defaultTransform toolscache.TransformFunc) func(opts *Options)

WithDefaultTransform sets the DefaultTransform for the cache client.

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