fake

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeClients

func NewFakeClients(opts *Options) mgrclient.Client

NewFakeClients new fake client by given options

func NewFakeClientsFor

func NewFakeClientsFor(fn func(c *FakerClient)) mgrclient.Client

NewFakeClientsFor new fake client by customize

Types

type FakerClient

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

FakerClient implement kubernetes.client

func (*FakerClient) Cache

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

func (*FakerClient) CacheDiscovery added in v1.7.6

func (c *FakerClient) CacheDiscovery() discovery.CachedDiscoveryInterface

func (*FakerClient) ClientSet

func (c *FakerClient) ClientSet() kubernetes.Interface

func (*FakerClient) Direct

func (c *FakerClient) Direct() client.Client

func (*FakerClient) Discovery

func (c *FakerClient) Discovery() discovery.DiscoveryInterface

func (*FakerClient) Metrics

func (c *FakerClient) Metrics() versioned.Interface

func (*FakerClient) RESTMapper

func (c *FakerClient) RESTMapper() meta.RESTMapper

type Options

type Options struct {
	Scheme               *runtime.Scheme
	Objs                 []client.Object
	Lists                []client.ObjectList
	ClientRuntimeObjs    []runtime.Object
	ClientSetRuntimeObjs []runtime.Object
	MetricsRuntimeObjs   []runtime.Object
}

Options used to generate fake client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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