mock

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clientsets

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

func NewClientsets

func NewClientsets() *Clientsets

NewClientsets returns a new Clientsets using fake clients.

func (*Clientsets) Furiko

func (c *Clientsets) Furiko() furiko.Interface

func (*Clientsets) FurikoMock

func (c *Clientsets) FurikoMock() *furikofake.Clientset

FurikoMock returns the underlying fake clientset.

func (*Clientsets) Kubernetes

func (c *Clientsets) Kubernetes() kubernetes.Interface

func (*Clientsets) KubernetesMock

func (c *Clientsets) KubernetesMock() *fake.Clientset

KubernetesMock returns the underlying fake clientset.

type ConfigLoader

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

func NewMockConfigLoader

func NewMockConfigLoader() *ConfigLoader

func (*ConfigLoader) GetConfig

func (c *ConfigLoader) GetConfig(configName configv1.ConfigName) (*viper.Viper, error)

func (*ConfigLoader) Name

func (c *ConfigLoader) Name() string

func (*ConfigLoader) SetConfig

func (c *ConfigLoader) SetConfig(configName configv1.ConfigName, config runtime.Object)

func (*ConfigLoader) Start

func (c *ConfigLoader) Start(ctx context.Context) error

type Configs

type Configs struct {
	controllercontext.Configs
	// contains filtered or unexported fields
}

func NewConfigs

func NewConfigs() *Configs

NewConfigs returns a new dynamic Configs manager that supports overriding a defaults configloader with configs from memory.

func (*Configs) MockConfigLoader

func (c *Configs) MockConfigLoader() *ConfigLoader

MockConfigLoader returns the mock configloader.ConfigLoader.

type Context

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

Context is a mock context that implements controllercontext.ContextInterface and is made up of mock components that can be used for unit tests.

func NewContext

func NewContext() *Context

func (*Context) Clientsets

func (c *Context) Clientsets() controllercontext.Clientsets

func (*Context) Configs

func (c *Context) Configs() controllercontext.Configs

func (*Context) Informers

func (c *Context) Informers() controllercontext.Informers

func (*Context) MockClientsets

func (c *Context) MockClientsets() *Clientsets

MockClientsets returns the underlying mock clientsets.

func (*Context) MockConfigs

func (c *Context) MockConfigs() *Configs

func (*Context) Start

func (c *Context) Start(ctx context.Context) error

func (*Context) Stores

func (c *Context) Stores() controllercontext.Stores

type Informers

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

func NewInformers

func NewInformers(clientsets controllercontext.Clientsets) *Informers

NewInformers returns a new mock Informers implementations that implements controllercontext.Informers.

func (*Informers) Furiko

func (*Informers) Kubernetes

func (i *Informers) Kubernetes() informers.SharedInformerFactory

func (*Informers) Start

func (i *Informers) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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