fake

package
v0.0.0-...-bd27db3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeClient

func NewFakeClient(objs ...crclient.Object) cnoclient.Client

NewFakeClient creates a fake client with a backing store that contains the given objexts.

Note that, due to limitations in the test infrastructure, each client has an independent store. This means that changes made in, say, the crclient, won't show up in the Dynamic client or the typed Kubernetes client TODO: stop using the crclient entirely TODO: Somehow convince upstream client-go to allow sharing the store between the dynamic and typed clients.

(this is't that big a deal since we don't actually use the typed client that much).

Types

type FakeClient

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

func (*FakeClient) ClientFor

func (fc *FakeClient) ClientFor(name string) cnoclient.ClusterClient

func (*FakeClient) Clients

func (fc *FakeClient) Clients() map[string]cnoclient.ClusterClient

func (*FakeClient) Default

func (fc *FakeClient) Default() cnoclient.ClusterClient

func (*FakeClient) Start

func (fc *FakeClient) Start(context.Context) error

type FakeClusterClient

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

func (*FakeClusterClient) AddCustomInformer

func (fc *FakeClusterClient) AddCustomInformer(inf cache.SharedInformer)

func (*FakeClusterClient) CRClient

func (fc *FakeClusterClient) CRClient() crclient.Client

func (*FakeClusterClient) Config

func (fc *FakeClusterClient) Config() *rest.Config

func (*FakeClusterClient) Dynamic

func (fc *FakeClusterClient) Dynamic() dynamic.Interface

func (*FakeClusterClient) HostPort

func (fc *FakeClusterClient) HostPort() (string, string)

func (*FakeClusterClient) Kubernetes

func (fc *FakeClusterClient) Kubernetes() kubernetes.Interface

func (*FakeClusterClient) OpenshiftOperatorClient

func (fc *FakeClusterClient) OpenshiftOperatorClient() *osoperclient.Clientset

func (*FakeClusterClient) OperatorHelperClient

func (fc *FakeClusterClient) OperatorHelperClient() operatorv1helpers.OperatorClient

func (*FakeClusterClient) RESTMapper

func (fc *FakeClusterClient) RESTMapper() meta.RESTMapper

func (*FakeClusterClient) Scheme

func (fc *FakeClusterClient) Scheme() *runtime.Scheme

Jump to

Keyboard shortcuts

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