fake

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluater

type Evaluater struct {
	GetEvaluationReactor func(gatheredMetrics []*metric.Metric) (*evaluate.Evaluation, error)
}

Evaluater (fake) provides a way to insert functionality into a Evaluater

func (*Evaluater) GetEvaluation

func (f *Evaluater) GetEvaluation(gatheredMetrics []*metric.Metric) (*evaluate.Evaluation, error)

GetEvaluation calls the fake Evaluater function

type Execute

type Execute struct {
	ExecuteWithValueReactor func(definition *hook.Definition, value string) (string, error)
	GetTypeReactor          func() string
}

Execute (fake) provides a way to insert functionality into a hook executer

func (*Execute) ExecuteWithValue

func (e *Execute) ExecuteWithValue(definition *hook.Definition, value string) (string, error)

ExecuteWithValue calls the fake Executer function

func (*Execute) GetType

func (e *Execute) GetType() string

GetType calls the fake Executer function

type Predicter

type Predicter struct {
	GetPredictionReactor  func(model *config.Model, evaluations []*stored.Evaluation) (int32, error)
	GetIDsToRemoveReactor func(model *config.Model, evaluations []*stored.Evaluation) ([]int, error)
	GetTypeReactor        func() string
}

Predicter (fake) provides a way to insert functionality into a Predicter

func (*Predicter) GetIDsToRemove

func (f *Predicter) GetIDsToRemove(model *config.Model, evaluations []*stored.Evaluation) ([]int, error)

GetIDsToRemove calls the fake Predicter function

func (*Predicter) GetPrediction

func (f *Predicter) GetPrediction(model *config.Model, evaluations []*stored.Evaluation) (int32, error)

GetPrediction calls the fake Predicter function

func (*Predicter) GetType

func (f *Predicter) GetType() string

GetType calls the fake Predicter function

type Run

type Run struct {
	RunAlgorithmWithValueReactor func(algorithmPath string, value string, timeout int) (string, error)
}

Run (fake) provides a way to insert functionality into an algorithm Runner

func (*Run) RunAlgorithmWithValue

func (f *Run) RunAlgorithmWithValue(algorithmPath string, value string, timeout int) (string, error)

RunAlgorithmWithValue calls the fake Runner function

type Store

type Store struct {
	GetEvaluationReactor    func(model string) ([]*stored.Evaluation, error)
	AddEvaluationReactor    func(model string, evaluation *evaluate.Evaluation) error
	RemoveEvaluationReactor func(id int) error
	GetModelReactor         func(model string) (*stored.Model, error)
	UpdateModelReactor      func(model string, intervalsPassed int) error
}

Store (fake) provides a way to insert functionality into a Store

func (*Store) AddEvaluation

func (f *Store) AddEvaluation(model string, evaluation *evaluate.Evaluation) error

AddEvaluation calls the fake Store function

func (*Store) GetEvaluation

func (f *Store) GetEvaluation(model string) ([]*stored.Evaluation, error)

GetEvaluation calls the fake Store function

func (*Store) GetModel

func (f *Store) GetModel(model string) (*stored.Model, error)

GetModel calls the fake Store function

func (*Store) RemoveEvaluation

func (f *Store) RemoveEvaluation(id int) error

RemoveEvaluation calls the fake Store function

func (*Store) UpdateModel

func (f *Store) UpdateModel(model string, intervalsPassed int) error

UpdateModel calls the fake Store function

Jump to

Keyboard shortcuts

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