auditor

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockRuleValidator

func NewMockRuleValidator() *mockRuleValidator

NewMockRuleValidator create mock RuleValidator

Types

type Auditor

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

Auditor as a structure of auditor

func New

func New(toleranceStore protocol.ToleranceStore,
	validator RuleValidator,
	metadataStore protocol.MetadataStore,
	metricStore protocol.MetricStore) *Auditor

New create Auditor

func (*Auditor) Audit

func (a *Auditor) Audit(audit *job.Audit) ([]*protocol.AuditReport, error)

Audit audit entry point

type DefaultRuleValidator

type DefaultRuleValidator struct {
}

DefaultRuleValidator as a default rule validator

func NewDefaultRuleValidator

func NewDefaultRuleValidator() *DefaultRuleValidator

NewDefaultRuleValidator construct DefaultRuleValidator

func (DefaultRuleValidator) Validate

func (d DefaultRuleValidator) Validate(metrics []*metric.Metric, tolerances []*protocol.Tolerance) ([]*protocol.ValidatedMetric, error)

Validate to validate metrics based on tolerances

type RuleValidator

type RuleValidator interface {
	Validate(metrics []*metric.Metric, tolerances []*protocol.Tolerance) ([]*protocol.ValidatedMetric, error)
}

RuleValidator to validate metric value with rule

Jump to

Keyboard shortcuts

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