optimizer

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIOptimizer

type AIOptimizer interface {
	// Optimize suggests and applies optimizations for a running engine.
	Optimize(ctx context.Context, id string, e *engine.Engine, status telemetry.StatusUpdate) error
}

AIOptimizer defines the interface for AI-driven performance optimization.

type CorrectionAction

type CorrectionAction string

CorrectionAction defines the type of fix to apply.

const (
	ActionScaleBatch     CorrectionAction = "scale_batch"
	ActionAdjustTimeout  CorrectionAction = "adjust_timeout"
	ActionIncreaseRetry  CorrectionAction = "increase_retry"
	ActionNotifyOperator CorrectionAction = "notify_operator"
	ActionSafeMode       CorrectionAction = "safe_mode"
	ActionSuggestMapping CorrectionAction = "suggest_mapping"
)

type DefaultAIOptimizer

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

DefaultAIOptimizer implements AIOptimizer using the SelfHealingService.

func NewAIOptimizer

func NewAIOptimizer(aiSvc *ai.SelfHealingService, logger hermod.Logger) *DefaultAIOptimizer

NewAIOptimizer creates a new DefaultAIOptimizer.

func (*DefaultAIOptimizer) Optimize

Optimize analyzes engine metrics and applies AI-driven tunings.

type FailurePattern

type FailurePattern struct {
	ID          string
	Description string
	Threshold   float64
	Window      time.Duration
}

FailurePattern represents a detected issue in the pipeline.

type Optimizer

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

Optimizer tracks engine metrics and suggests/applies runtime tunings.

func NewOptimizer

func NewOptimizer(logger hermod.Logger, aiOpt AIOptimizer, notifier func(workflowID, title, message string)) *Optimizer

func (*Optimizer) Register

func (o *Optimizer) Register(id string, e *engine.Engine)

func (*Optimizer) Start

func (o *Optimizer) Start(ctx context.Context)

func (*Optimizer) Unregister

func (o *Optimizer) Unregister(id string)

type OptimizerConfig

type OptimizerConfig struct {
	OptimizationInterval time.Duration
	EnableAI             bool
}

type SelfCorrectionGate

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

SelfCorrectionGate handles high-confidence failure patterns.

func NewSelfCorrectionGate

func NewSelfCorrectionGate(logger hermod.Logger, notifier func(workflowID, title, message string)) *SelfCorrectionGate

func (*SelfCorrectionGate) Analyze

func (g *SelfCorrectionGate) Analyze(id string, e *engine.Engine, status telemetry.StatusUpdate)

Jump to

Keyboard shortcuts

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