detection

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0, BSD-3-Clause, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockDetection

func NewMockDetection(anomaly *bool, metrics []string) detection.Detector

NewMockDetection new detection mock manager

Types

type MockDetection

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

MockDetection detection mock type

func (*MockDetection) Add

func (m *MockDetection) Add(data detection.TimedData)

Add add detect data

func (*MockDetection) AddAll

func (m *MockDetection) AddAll(vals []detection.TimedData)

AddAll add detect data array

func (*MockDetection) IsAnomaly

func (m *MockDetection) IsAnomaly() (bool, error)

IsAnomaly checks if current values is anomaly

func (*MockDetection) Metrics

func (m *MockDetection) Metrics() []string

Metrics return current detector metrics

func (*MockDetection) Name

func (m *MockDetection) Name() string

Name show detector name

func (*MockDetection) Reason

func (m *MockDetection) Reason() string

Reason get anomaly reason

func (*MockDetection) SampleCount

func (m *MockDetection) SampleCount() int

SampleCount get current data count

func (*MockDetection) SampleDuration

func (m *MockDetection) SampleDuration() time.Duration

SampleDuration get current data time range

Jump to

Keyboard shortcuts

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