fake

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StaticMetricClient = MetricClient{
	StableConcurrency: 10.0,
	PanicConcurrency:  10.0,
	StableRPS:         10.0,
	PanicRPS:          10.0,
}

StaticMetricClient returns stable/panic concurrency and RPS with static value, i.e. 10.

Functions

This section is empty.

Types

type MetricClient

type MetricClient struct {
	StableConcurrency float64
	PanicConcurrency  float64
	StableRPS         float64
	PanicRPS          float64
	ErrF              func(key types.NamespacedName, now time.Time) error
}

MetricClient is a fake implementation of autoscaler.MetricClient for testing.

func (*MetricClient) StableAndPanicConcurrency

func (t *MetricClient) StableAndPanicConcurrency(key types.NamespacedName, now time.Time) (float64, float64, error)

StableAndPanicConcurrency returns stable/panic concurrency stored in the object and the result of Errf as the error.

func (*MetricClient) StableAndPanicRPS added in v0.9.0

func (t *MetricClient) StableAndPanicRPS(key types.NamespacedName, now time.Time) (float64, float64, error)

StableAndPanicRPS returns stable/panic RPS stored in the object and the result of Errf as the error.

Jump to

Keyboard shortcuts

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