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

package evaluate

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

Package evaluate provides functionality for managing evaluating, calling external evaluation logic through shell commands with relevant data piped to them.

Index

Package Files

evaluate.go

type Evaluation Uses

type Evaluation struct {
    TargetReplicas int32 `json:"targetReplicas"`
}

Evaluation represents a decision on how to scale a resource

type Evaluator Uses

type Evaluator struct {
    Config  *config.Config
    Execute execute.Executer
}

Evaluator handles triggering the evaluation logic to decide how to scale a resource

func (*Evaluator) GetEvaluation Uses

func (e *Evaluator) GetEvaluation(spec Spec) (*Evaluation, error)

GetEvaluation uses the metrics provided to determine a set of evaluations

type GetEvaluationer Uses

type GetEvaluationer interface {
    GetEvaluation(evaluateSpec Spec) (*Evaluation, error)
}

GetEvaluationer provides methods for retrieving an evaluation

type Spec Uses

type Spec struct {
    Metrics    []*metric.Metric `json:"metrics"`
    Resource   metav1.Object    `json:"resource"`
    Evaluation *Evaluation      `json:"evaluation,omitempty"`
    RunType    string           `json:"runType"`
}

Spec defines information fed into an evaluator to produce an evaluation, contains optional 'Evaluation' field for storing the result

Package evaluate imports 6 packages (graph) and is imported by 14 packages. Updated 2020-03-06. Refresh now. Tools for package owners.