advisor

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package advisor implements the advisory engine that detects quality patterns from failure events and produces actionable recommendations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advisor

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

Advisor runs in the background and periodically refreshes quality recommendations.

func New

func New(st StoreReader, logger *zap.Logger) *Advisor

New creates a new Advisor. Call Start to begin background detection.

func (*Advisor) Recommendations

func (a *Advisor) Recommendations() []models.QualityRecommendation

Recommendations returns a copy of the current advisory recommendations.

func (*Advisor) Start

func (a *Advisor) Start(ctx context.Context) error

Start runs the advisory engine in a background loop, refreshing every 15 minutes. It returns when ctx is cancelled.

type StoreReader

type StoreReader interface {
	ListFailureEvents(ctx context.Context, since time.Time, limit int) ([]*models.FailureEvent, error)
	GetKPIReport(ctx context.Context) (*models.KPIReport, error)
}

StoreReader is the minimal store interface the advisor needs.

Jump to

Keyboard shortcuts

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