mock

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 16 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) ClearActions added in v0.1.0

func (c *Clientsets) ClearActions()

ClearActions clears all actions.

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) Load added in v0.1.0

func (*ConfigLoader) Name

func (c *ConfigLoader) Name() string

func (*ConfigLoader) SetConfig

func (c *ConfigLoader) SetConfig(configName configv1alpha1.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 config manager that supports overriding a defaults configloader with configs from memory.

func (*Configs) MockConfigLoader

func (c *Configs) MockConfigLoader() *ConfigLoader

MockConfigLoader returns the mock configloader.Loader.

func (*Configs) SetConfigs added in v0.1.0

func (c *Configs) SetConfigs(cfgs map[configv1alpha1.ConfigName]runtime.Object)

SetConfigs is a convenience method to set configs from a map.

type Context

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

Context is a mock context that implements controllercontext.Context 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) MockStores added in v0.1.0

func (c *Context) MockStores() *Stores

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

type StoreFactory added in v0.1.0

type StoreFactory interface {
	Name() string
	New(ctx controllercontext.Context) (controllermanager.Store, error)
}

type Stores added in v0.1.0

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

func NewStores added in v0.1.0

func NewStores(c *Context) *Stores

func (*Stores) RegisterFromFactoriesOrDie added in v0.1.0

func (s *Stores) RegisterFromFactoriesOrDie(factories ...StoreFactory)

Jump to

Keyboard shortcuts

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