Documentation
¶
Overview ¶
Package engine implements the core detection engine streaming logic, event processing, logging, and metrics.
Index ¶
- func RiskLevel(score float64, t config.RiskThresholds) string
- func RiskLevelName(rank int) string
- func RiskScore(entries []state.RiskContribution, now time.Time) (active []state.RiskContribution, effective []float64, total float64)
- func ValidateRules(rules map[ruleset.RuleID]*ruleset.Rule, liteFuncs *litefunc.Registry) error
- type DetectionEngine
- type Lifecycle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RiskLevel ¶
func RiskLevel(score float64, t config.RiskThresholds) string
RiskLevel ignores alert_level.
func RiskLevelName ¶
func RiskScore ¶
func RiskScore(entries []state.RiskContribution, now time.Time) (active []state.RiskContribution, effective []float64, total float64)
Types ¶
type DetectionEngine ¶
type DetectionEngine struct {
Logger *extendedLogger
// contains filtered or unexported fields
}
func NewDetectionEngine ¶
func (*DetectionEngine) NewLifecycle ¶
func (de *DetectionEngine) NewLifecycle(ctx context.Context) *Lifecycle
func (*DetectionEngine) RunWithSourceSinks ¶
type Lifecycle ¶
type Lifecycle struct {
Ingest context.Context
StopIngest context.CancelFunc
Delivery context.Context
AbortDelivery context.CancelFunc
// contains filtered or unexported fields
}
Lifecycle separates stopping ingest from aborting delivery: once Ingest is cancelled the pipeline drains, and Delivery is cancelled only if draining outlasts the shutdown timeout.