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 ¶
ExecuteWithValue calls the fake Execute reactor method provided
type Gatherer ¶ added in v2.7.0
type Gatherer struct {
GatherReactor func(specs []autoscalingv2.MetricSpec, namespace string, podSelector labels.Selector) ([]*metrics.Metric, error)
}
Gather (fake) provides a way to insert functionality into a Gatherer
type ResourceClient ¶
type ResourceClient struct {
GetReactor func(apiVersion string, kind string, name string, namespace string) (*unstructured.Unstructured, error)
}
ResourceClient (fake) allows inserting logic into a resource client for testing
func (*ResourceClient) Get ¶
func (u *ResourceClient) Get(apiVersion string, kind string, name string, namespace string) (*unstructured.Unstructured, error)
Get calls the fake ResourceClient reactor method provided
type Scaler ¶
type Scaler struct { ScaleReactor func(info scale.Info, scaleResource *autoscalingv1.Scale) (*evaluate.Evaluation, error) GetScaleSubResourceReactor func(apiVersion string, kind string, namespace string, name string) (*autoscalingv1.Scale, error) }
Scaler (fake) allows inserting logic into a scaler for testing
func (*Scaler) GetScaleSubResource ¶ added in v2.5.0
func (s *Scaler) GetScaleSubResource(apiVersion string, kind string, namespace string, name string) (*autoscalingv1.Scale, error)
GetScaleSubResource calls the fake GetScaleSubResource reactor method provided
func (*Scaler) Scale ¶
func (s *Scaler) Scale(info scale.Info, scaleResource *autoscalingv1.Scale) (*evaluate.Evaluation, error)
Scale calls the fake Scaler reactor method provided
Click to show internal directories.
Click to hide internal directories.