Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BadExtractor = extractors.BadExtractor
BadExtractor is an error occurring when extractor is invalid.
View Source
var BadLabelName = extractors.BadLabelName
BadLabelName is an error occurring when label name is invalid.
View Source
var BadRego = badRego{}
BadRego is an error occurring when rego compilation fails.
View Source
var BadSelector = badSelector{}
BadSelector is an error occurring when selector is invalid.
Functions ¶
This section is empty.
Types ¶
type CompiledRuleset ¶
type CompiledRuleset struct { ControlPointID selectors.ControlPointID Labelers []LabelerWithSelector ReportedRules []ReportedRule }
CompiledRuleset is compiled form of Classifier proto.
func CompileRuleset ¶
func CompileRuleset(ctx context.Context, name string, classifierWrapper *policysyncv1.ClassifierWrapper) (CompiledRuleset, error)
CompileRuleset parses ruleset's selector and compiles its rules.
type Labeler ¶
type Labeler struct { // rego query that's prepared to take envoy authz request as an input. // Result expression should be a single value (if LabelName is set) or a // map[string]interface{} otherwise. Query rego.PreparedEvalQuery // flags for created flow labels: LabelsTelemetry map[string]bool // multi-label variant // flow label that the result should be assigned to (single-label variant) LabelName string Telemetry bool // single-label variant }
Labeler is used to create flow labels
label can create either: * a single label – LabelName is non-empty or * multiple labels – LabelName is empty.
type LabelerWithSelector ¶
type LabelerWithSelector struct { Labeler *Labeler LabelSelector multimatcher.Expr ClassifierAttributes *policysyncv1.ClassifierAttributes }
LabelerWithSelector is a labeler with its selector.
type ReportedRule ¶
type ReportedRule struct { FlowSelector *policylangv1.FlowSelector Rule *policylangv1.Rule RulesetName string LabelName string }
ReportedRule is a rule along with its selector and label name.
Click to show internal directories.
Click to hide internal directories.