fake

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package fake provides stubs for testing relevant to the Custom Pod Autoscaler packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execute

type Execute struct {
	ExecuteWithValueReactor func(method *config.Method, value string) (string, error)
	GetTypeReactor          func() string
}

Execute (fake) allows inserting logic into an executer for testing

func (*Execute) ExecuteWithValue

func (f *Execute) ExecuteWithValue(method *config.Method, value string) (string, error)

ExecuteWithValue calls the fake Execute reactor method provided

func (*Execute) GetType

func (f *Execute) GetType() string

GetType calls the fake Execute reactor method provided

type ResourceClient added in v0.9.0

type ResourceClient struct {
	GetReactor func(apiVersion string, kind string, name string, namespace string) (metav1.Object, error)
}

ResourceClient (fake) allows inserting logic into a resource client for testing

func (*ResourceClient) Get added in v0.9.0

func (u *ResourceClient) Get(apiVersion string, kind string, name string, namespace string) (metav1.Object, error)

Get calls the fake ResourceClient reactor method provided

type Scaler added in v0.10.0

type Scaler struct {
	ScaleReactor func(spec scale.Spec) (*evaluate.Evaluation, error)
}

Scaler (fake) allows inserting logic into a scaler for testing

func (*Scaler) Scale added in v0.10.0

func (s *Scaler) Scale(spec scale.Spec) (*evaluate.Evaluation, error)

Scale calls the fake Scaler reactor method provided

Jump to

Keyboard shortcuts

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