rules

package
v0.0.0-...-dff764a Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RulesEngine

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

RulesEngine is used to test traces against a policy

func NewRulesEngine

func NewRulesEngine(policy string) *RulesEngine

NewRulesEngine creates a rules engine with a policy defined by the policy argument

func (*RulesEngine) AcceptSpans

func (r *RulesEngine) AcceptSpans(spans []honey.Span) (decision bool, sample *SampleResult)

AcceptSpans checks whether a set of spans is accepted by the rules engine or not

type SampleResult

type SampleResult struct {
	SampleRate int    `json:"sampleRate"`
	Reason     string `json:"reason"`
}

SampleResult expresses the result from the policy of what rule matched and the appropriate sample rate

Jump to

Keyboard shortcuts

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