fake

package
v1.60.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSet

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

ClientSet contains information to provide a fake implementation for tests.

func NewClientSet

func NewClientSet() *ClientSet

NewClientSet returns a new empty fake ClientSet.

func (*ClientSet) APIReader added in v1.18.0

func (c *ClientSet) APIReader() client.Reader

APIReader returns a client.Reader that directly reads from the API server.

func (*ClientSet) Applier

func (c *ClientSet) Applier() kubernetes.Applier

Applier returns the applier of this ClientSet.

func (*ClientSet) Cache

func (c *ClientSet) Cache() cache.Cache

Cache returns the clientset's controller-runtime cache. It can be used to get Informers for arbitrary objects.

func (*ClientSet) ChartApplier

func (c *ClientSet) ChartApplier() kubernetes.ChartApplier

ChartApplier returns a ChartApplier using the ClientSet's ChartRenderer and Applier.

func (*ClientSet) ChartRenderer

func (c *ClientSet) ChartRenderer() chartrenderer.Interface

ChartRenderer returns a ChartRenderer populated with the cluster's Capabilities.

func (*ClientSet) Client

func (c *ClientSet) Client() client.Client

Client returns the controller-runtime client of this ClientSet.

func (*ClientSet) DiscoverVersion added in v1.8.0

func (c *ClientSet) DiscoverVersion() (*version.Info, error)

DiscoverVersion tries to retrieve the server version using the kubernetes discovery client.

func (*ClientSet) Kubernetes

func (c *ClientSet) Kubernetes() kubernetesclientset.Interface

Kubernetes will return the kubernetes attribute of the Client object.

func (*ClientSet) RESTClient

func (c *ClientSet) RESTClient() rest.Interface

RESTClient will return the restClient attribute of the Client object.

func (*ClientSet) RESTConfig

func (c *ClientSet) RESTConfig() *rest.Config

RESTConfig will return the restConfig attribute of the Client object.

func (*ClientSet) Start

func (c *ClientSet) Start(context.Context)

Start does nothing as the fake ClientSet does not support it.

func (*ClientSet) Version

func (c *ClientSet) Version() string

Version returns the GitVersion of the Kubernetes client stored on the object.

func (*ClientSet) WaitForCacheSync

func (c *ClientSet) WaitForCacheSync(context.Context) bool

WaitForCacheSync does nothing and return true.

type ClientSetBuilder

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

ClientSetBuilder is a builder for fake ClientSets

func NewClientSetBuilder

func NewClientSetBuilder() *ClientSetBuilder

NewClientSetBuilder return a new builder for building fake ClientSets

func (*ClientSetBuilder) Build

func (b *ClientSetBuilder) Build() *ClientSet

Build builds the ClientSet.

func (*ClientSetBuilder) WithAPIReader added in v1.20.0

func (b *ClientSetBuilder) WithAPIReader(apiReader client.Reader) *ClientSetBuilder

WithAPIReader sets the apiReader attribute of the builder.

func (*ClientSetBuilder) WithApplier

func (b *ClientSetBuilder) WithApplier(applier kubernetes.Applier) *ClientSetBuilder

WithApplier sets the applier attribute of the builder.

func (*ClientSetBuilder) WithCache

func (b *ClientSetBuilder) WithCache(cache cache.Cache) *ClientSetBuilder

WithCache sets the cache attribute of the builder.

func (*ClientSetBuilder) WithChartApplier

func (b *ClientSetBuilder) WithChartApplier(chartApplier kubernetes.ChartApplier) *ClientSetBuilder

WithChartApplier sets the chartApplier attribute of the builder.

func (*ClientSetBuilder) WithChartRenderer

func (b *ClientSetBuilder) WithChartRenderer(chartRenderer chartrenderer.Interface) *ClientSetBuilder

WithChartRenderer sets the chartRenderer attribute of the builder.

func (*ClientSetBuilder) WithClient

func (b *ClientSetBuilder) WithClient(client client.Client) *ClientSetBuilder

WithClient sets the client attribute of the builder.

func (*ClientSetBuilder) WithKubernetes

func (b *ClientSetBuilder) WithKubernetes(kubernetes kubernetesclientset.Interface) *ClientSetBuilder

WithKubernetes sets the kubernetes attribute of the builder.

func (*ClientSetBuilder) WithRESTClient

func (b *ClientSetBuilder) WithRESTClient(restClient rest.Interface) *ClientSetBuilder

WithRESTClient sets the restClient attribute of the builder.

func (*ClientSetBuilder) WithRESTConfig

func (b *ClientSetBuilder) WithRESTConfig(config *rest.Config) *ClientSetBuilder

WithRESTConfig sets the restConfig attribute of the builder.

func (*ClientSetBuilder) WithVersion

func (b *ClientSetBuilder) WithVersion(version string) *ClientSetBuilder

WithVersion sets the version attribute of the builder.

type PortForwarder added in v1.32.0

type PortForwarder struct {
	Err                 error
	ReadyChan, DoneChan chan struct{}
}

PortForwarder fakes the PortForwarder interface.

func (PortForwarder) ForwardPorts added in v1.32.0

func (f PortForwarder) ForwardPorts() error

ForwardPorts returns Err as soon as DoneChan is closed.

func (PortForwarder) Ready added in v1.32.0

func (f PortForwarder) Ready() chan struct{}

Ready returns ReadyChan.

Jump to

Keyboard shortcuts

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