anomalydetector

package
v0.0.0-...-02a17aa Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(slice []string, contains string) bool

ContainsString checks if the slice has the contains value in it.

Types

type AnomalyDetector

type AnomalyDetector interface {
	GetPodsOutOfBounds() ([]*kapiv1.Pod, error)
}

AnomalyDetector returns the list of pods that do not behave correctly according to the configuration

func New

New Factory for AnomalyDetection

type Config

type Config struct {
	BreakerStrategyConfig api.BreakerStrategy
	Selector              labels.Selector
	PodLister             kv1.PodNamespaceLister
	Logger                *zap.Logger
}

Config parameters required for the creation of an AnomalyDetector

type ContinuousValueDeviationAnalyser

type ContinuousValueDeviationAnalyser struct {
	api.ContinuousValueDeviation
	// contains filtered or unexported fields
}

ContinuousValueDeviationAnalyser anomalyDetector that check the deviation of a continous value compare to average

func (*ContinuousValueDeviationAnalyser) GetPodsOutOfBounds

func (d *ContinuousValueDeviationAnalyser) GetPodsOutOfBounds() ([]*kapiv1.Pod, error)

GetPodsOutOfBounds implements interface AnomalyDetector

type CustomAnomalyDetector

type CustomAnomalyDetector struct {
	// contains filtered or unexported fields
}

CustomAnomalyDetector call an external service to get the list of faulty pods

func (*CustomAnomalyDetector) GetPodsOutOfBounds

func (c *CustomAnomalyDetector) GetPodsOutOfBounds() ([]*kapiv1.Pod, error)

GetPodsOutOfBounds implements the anomaly detector interface

type DiscreteValueOutOfListAnalyser

type DiscreteValueOutOfListAnalyser struct {
	api.DiscreteValueOutOfList
	// contains filtered or unexported fields
}

DiscreteValueOutOfListAnalyser anomalyDetector that check the ratio of good/bad value and return the pods that exceed a given threshold for that ratio

func (*DiscreteValueOutOfListAnalyser) GetPodsOutOfBounds

func (d *DiscreteValueOutOfListAnalyser) GetPodsOutOfBounds() ([]*kapiv1.Pod, error)

GetPodsOutOfBounds implements interface AnomalyDetector

type Factory

type Factory func(cfg FactoryConfig) (AnomalyDetector, error)

Factory functor for AnomalyDetection

type FactoryConfig

type FactoryConfig struct {
	Config
	// contains filtered or unexported fields
}

FactoryConfig parameters extended with factory features

Jump to

Keyboard shortcuts

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