config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package config provides configuration options for the Predictive Horizontal Pod Autoscaler

Index

Constants

View Source
const (
	// DecisionMaximum means use the highest predicted value from the models
	DecisionMaximum = "maximum"
	// DecisionMinimum means use the lowest predicted value from the models
	DecisionMinimum = "minimum"
	// DecisionMean means use the mean average of predicted values
	DecisionMean = "mean"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Models        []*Model `yaml:"models"`
	DecisionType  string   `yaml:"decisionType"`
	DBPath        string   `yaml:"dbPath"`
	MigrationPath string   `yaml:"migrationPath"`
}

Config holds the configuration of the Predictive element of the PHPA

func LoadConfig

func LoadConfig(configEnv []byte) (*Config, error)

LoadConfig takes in the predictive config as a byte array and uses it to build the config, overriding default values

type Linear

type Linear struct {
	LookAhead    int64 `yaml:"lookAhead"`
	StoredValues int64 `yaml:"storedValues"`
}

Linear represents a linear regression prediction model

type Model

type Model struct {
	Type        string  `yaml:"type"`
	Name        string  `yaml:"name"`
	PerInterval int64   `yaml:"perInterval"`
	Linear      *Linear `yaml:"linear"`
}

Model represents a prediction model to use, e.g. a linear regression

Jump to

Keyboard shortcuts

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