custom-pod-autoscaler: github.com/jthomperoo/custom-pod-autoscaler/fake Index | Files

package fake

import "github.com/jthomperoo/custom-pod-autoscaler/fake"

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

Index

Package Files

doc.go execute.go resourceclient.go scaler.go

type Execute Uses

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 Uses

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

ExecuteWithValue calls the fake Execute reactor method provided

func (*Execute) GetType Uses

func (f *Execute) GetType() string

GetType calls the fake Execute reactor method provided

type ResourceClient Uses

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 Uses

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 Uses

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

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

func (*Scaler) Scale Uses

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

Scale calls the fake Scaler reactor method provided

Package fake imports 4 packages (graph). Updated 2020-02-29. Refresh now. Tools for package owners.