Documentation
¶
Index ¶
- Constants
- type CacheLevel
- type CacheMetrics
- type CacheMetricsCollector
- func (c *CacheMetricsCollector) GetEvictionRate() float64
- func (c *CacheMetricsCollector) GetOverallHitRate() float64
- func (c *CacheMetricsCollector) GetOverallMissRate() float64
- func (c *CacheMetricsCollector) GetUsagePatterns() *CacheUsagePatterns
- func (c *CacheMetricsCollector) RecordCacheHit(level CacheLevel, key string)
- func (c *CacheMetricsCollector) RecordCacheMiss(level CacheLevel, key string)
- func (c *CacheMetricsCollector) RecordCacheSet(level CacheLevel, key string)
- type CachePolicy
- type CacheUsagePatterns
- type CachingProfile
- type ConnectionMetrics
- type ConnectionPoolManager
- type ControllerInstance
- type DatabaseConnectionPool
- type DiskIOMetrics
- type EvictionPattern
- type EvictionPolicy
- type HTTPConnectionPool
- type L1Cache
- func (c *L1Cache) Cleanup()
- func (c *L1Cache) Delete(_ string) error
- func (c *L1Cache) Disable()
- func (c *L1Cache) Enable()
- func (c *L1Cache) Get(_ string) (interface{}, bool)
- func (c *L1Cache) GetItemCount() int64
- func (c *L1Cache) GetSize() int64
- func (c *L1Cache) Set(_ string, _ interface{}, _ time.Duration) error
- func (c *L1Cache) Start(_ context.Context) error
- func (c *L1Cache) Stop(_ context.Context) error
- type L2Cache
- func (c *L2Cache) Cleanup(_ context.Context)
- func (c *L2Cache) Delete(_ context.Context, _ string) error
- func (c *L2Cache) Disable()
- func (c *L2Cache) Enable()
- func (c *L2Cache) Get(ctx context.Context, key string) (interface{}, error)
- func (c *L2Cache) GetItemCount() int64
- func (c *L2Cache) GetSize() int64
- func (c *L2Cache) Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error
- func (c *L2Cache) Start(_ context.Context) error
- func (c *L2Cache) Stop(_ context.Context) error
- type L3Cache
- func (c *L3Cache) Cleanup(_ context.Context)
- func (c *L3Cache) Delete(_ context.Context, _ string) error
- func (c *L3Cache) Disable()
- func (c *L3Cache) Enable()
- func (c *L3Cache) Get(ctx context.Context, key string) (interface{}, error)
- func (c *L3Cache) GetItemCount() int64
- func (c *L3Cache) GetSize() int64
- func (c *L3Cache) Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error
- func (c *L3Cache) Start(_ context.Context) error
- func (c *L3Cache) Stop(_ context.Context) error
- type LoadBalancer
- type LoadBalancingStrategy
- type MetricsAnalyzer
- type MultiLevelCacheManager
- func (cm *MultiLevelCacheManager) ApplyCachingProfile(profile CachingProfile) error
- func (cm *MultiLevelCacheManager) Delete(ctx context.Context, key string) error
- func (cm *MultiLevelCacheManager) Get(ctx context.Context, key string) (interface{}, error)
- func (cm *MultiLevelCacheManager) GetCacheMetrics() *CacheMetrics
- func (cm *MultiLevelCacheManager) OptimizeCache(ctx context.Context, parameters map[string]interface{}) error
- func (cm *MultiLevelCacheManager) Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error
- func (cm *MultiLevelCacheManager) Start(ctx context.Context) error
- func (cm *MultiLevelCacheManager) Stop(ctx context.Context) error
- func (cm *MultiLevelCacheManager) WarmCache(ctx context.Context) error
- type NetworkIOMetrics
- type PerformanceAnalysis
- type PerformanceBottleneck
- type PerformanceConfig
- type PerformanceManager
- func (pm *PerformanceManager) AutoOptimize(ctx context.Context) error
- func (pm *PerformanceManager) GetPerformanceRecommendations(ctx context.Context) (*PerformanceRecommendations, error)
- func (pm *PerformanceManager) OptimizeForProfile(ctx context.Context, profileName string, phase interfaces.ProcessingPhase) error
- func (pm *PerformanceManager) Start(ctx context.Context) error
- func (pm *PerformanceManager) Stop(ctx context.Context) error
- type PerformanceProfile
- type PerformanceRecommendations
- type PerformanceTrend
- type Recommendation
- type ResourceMonitor
- func (rm *ResourceMonitor) CollectMetrics(ctx context.Context)
- func (rm *ResourceMonitor) GetCurrentMetrics() *SystemMetrics
- func (rm *ResourceMonitor) GetMetricsHistory(duration time.Duration) []SystemMetrics
- func (rm *ResourceMonitor) Start(ctx context.Context) error
- func (rm *ResourceMonitor) Stop(ctx context.Context) error
- type ResourceProfile
- type ScalingDecision
- type ScalingDecisionEngine
- type ScalingPolicy
- type ScalingProfile
- type SystemMetrics
- type TimeoutProfile
Constants ¶
View Source
const ( CacheKeyLLMResponse = "llm:response:%s" // intent hash CacheKeyRAGContext = "rag:context:%s" // query hash CacheKeyResourcePlan = "resource:plan:%s" // plan hash CacheKeyManifestTemplate = "manifest:template:%s" // template hash CacheKeyGitCommit = "git:commit:%s" // manifest hash CacheKeyDeploymentStatus = "deployment:status:%s" // deployment hash CacheKeyTelecomKnowledge = "telecom:knowledge:%s" // knowledge hash )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheLevel ¶
type CacheLevel int
const ( L1CacheLevel CacheLevel = iota + 1 // In-memory local cache L2CacheLevel // Distributed Redis cache L3CacheLevel // Persistent storage cache )
type CacheMetrics ¶
type CacheMetricsCollector ¶
type CacheMetricsCollector struct {
// contains filtered or unexported fields
}
func NewCacheMetricsCollector ¶
func NewCacheMetricsCollector() *CacheMetricsCollector
func (*CacheMetricsCollector) GetEvictionRate ¶
func (c *CacheMetricsCollector) GetEvictionRate() float64
func (*CacheMetricsCollector) GetOverallHitRate ¶
func (c *CacheMetricsCollector) GetOverallHitRate() float64
func (*CacheMetricsCollector) GetOverallMissRate ¶
func (c *CacheMetricsCollector) GetOverallMissRate() float64
func (*CacheMetricsCollector) GetUsagePatterns ¶
func (c *CacheMetricsCollector) GetUsagePatterns() *CacheUsagePatterns
func (*CacheMetricsCollector) RecordCacheHit ¶
func (c *CacheMetricsCollector) RecordCacheHit(level CacheLevel, key string)
func (*CacheMetricsCollector) RecordCacheMiss ¶
func (c *CacheMetricsCollector) RecordCacheMiss(level CacheLevel, key string)
func (*CacheMetricsCollector) RecordCacheSet ¶
func (c *CacheMetricsCollector) RecordCacheSet(level CacheLevel, key string)
type CachePolicy ¶
type CachePolicy struct {
TTL time.Duration `json:"ttl"`
MaxSize int64 `json:"maxSize"`
EvictionPolicy EvictionPolicy `json:"evictionPolicy"`
Levels []CacheLevel `json:"levels"`
CompressionEnabled bool `json:"compressionEnabled"`
PrefetchEnabled bool `json:"prefetchEnabled"`
ReplicationFactor int `json:"replicationFactor"`
}
type CacheUsagePatterns ¶
type CachingProfile ¶
type ConnectionMetrics ¶
type ConnectionPoolManager ¶
type ConnectionPoolManager struct {
// contains filtered or unexported fields
}
func NewConnectionPoolManager ¶
func NewConnectionPoolManager(config *PerformanceConfig, logger logr.Logger) *ConnectionPoolManager
func (*ConnectionPoolManager) ApplyResourceProfile ¶
func (cpm *ConnectionPoolManager) ApplyResourceProfile(profile ResourceProfile) error
type ControllerInstance ¶
type ControllerInstance struct {
ID string `json:"id"`
Address string `json:"address"`
Health string `json:"health"` // healthy, degraded, unhealthy
CurrentLoad int `json:"currentLoad"`
MaxCapacity int `json:"maxCapacity"`
ProcessingPhases []interfaces.ProcessingPhase `json:"processingPhases"`
AvgResponseTime time.Duration `json:"avgResponseTime"`
ErrorRate float64 `json:"errorRate"`
ThroughputRate float64 `json:"throughputRate"`
}
type DatabaseConnectionPool ¶
type DatabaseConnectionPool struct {
// contains filtered or unexported fields
}
func NewDatabaseConnectionPool ¶
func NewDatabaseConnectionPool(name string, maxConns int, logger logr.Logger) *DatabaseConnectionPool
func (*DatabaseConnectionPool) Close ¶
func (p *DatabaseConnectionPool) Close() error
type DiskIOMetrics ¶
type EvictionPattern ¶
type EvictionPolicy ¶
type EvictionPolicy string
const ( EvictionLRU EvictionPolicy = "lru" EvictionLFU EvictionPolicy = "lfu" EvictionFIFO EvictionPolicy = "fifo" EvictionTTL EvictionPolicy = "ttl" EvictionRandom EvictionPolicy = "random" )
type HTTPConnectionPool ¶
type HTTPConnectionPool struct {
// contains filtered or unexported fields
}
func NewHTTPConnectionPool ¶
func NewHTTPConnectionPool(name string, maxConns int, logger logr.Logger) *HTTPConnectionPool
func (*HTTPConnectionPool) Close ¶
func (p *HTTPConnectionPool) Close() error
func (*HTTPConnectionPool) Resize ¶
func (p *HTTPConnectionPool) Resize(newSize int)
type L1Cache ¶
type L1Cache struct {
// contains filtered or unexported fields
}
func (*L1Cache) GetItemCount ¶
type L2Cache ¶
type L2Cache struct {
// contains filtered or unexported fields
}
func (*L2Cache) GetItemCount ¶
type L3Cache ¶
type L3Cache struct {
// contains filtered or unexported fields
}
func NewL3Cache ¶
func (*L3Cache) GetItemCount ¶
type LoadBalancer ¶
type LoadBalancer struct {
// contains filtered or unexported fields
}
func NewLoadBalancer ¶
func NewLoadBalancer(logger logr.Logger) *LoadBalancer
type LoadBalancingStrategy ¶
type LoadBalancingStrategy string
const ( LoadBalancingStrategyRoundRobin LoadBalancingStrategy = "round_robin" LoadBalancingStrategyLeastConnections LoadBalancingStrategy = "least_connections" LoadBalancingStrategyResourceBased LoadBalancingStrategy = "resource_based" )
type MetricsAnalyzer ¶
type MetricsAnalyzer struct {
// contains filtered or unexported fields
}
func NewMetricsAnalyzer ¶
func NewMetricsAnalyzer(logger logr.Logger) *MetricsAnalyzer
func (*MetricsAnalyzer) AnalyzePerformance ¶
func (ma *MetricsAnalyzer) AnalyzePerformance(metrics *SystemMetrics) *PerformanceAnalysis
type MultiLevelCacheManager ¶
type MultiLevelCacheManager struct {
// contains filtered or unexported fields
}
func NewMultiLevelCacheManager ¶
func NewMultiLevelCacheManager(config *PerformanceConfig, logger logr.Logger) *MultiLevelCacheManager
func (*MultiLevelCacheManager) ApplyCachingProfile ¶
func (cm *MultiLevelCacheManager) ApplyCachingProfile(profile CachingProfile) error
func (*MultiLevelCacheManager) Delete ¶
func (cm *MultiLevelCacheManager) Delete(ctx context.Context, key string) error
func (*MultiLevelCacheManager) Get ¶
func (cm *MultiLevelCacheManager) Get(ctx context.Context, key string) (interface{}, error)
func (*MultiLevelCacheManager) GetCacheMetrics ¶
func (cm *MultiLevelCacheManager) GetCacheMetrics() *CacheMetrics
func (*MultiLevelCacheManager) OptimizeCache ¶
func (cm *MultiLevelCacheManager) OptimizeCache(ctx context.Context, parameters map[string]interface{}) error
func (*MultiLevelCacheManager) Start ¶
func (cm *MultiLevelCacheManager) Start(ctx context.Context) error
type NetworkIOMetrics ¶
type PerformanceAnalysis ¶
type PerformanceAnalysis struct {
OverallHealth string `json:"overallHealth"` // healthy, degraded, unhealthy
CPUUtilization float64 `json:"cpuUtilization"`
MemoryUtilization float64 `json:"memoryUtilization"`
MaxQueueDepth int `json:"maxQueueDepth"`
AverageResponseTime time.Duration `json:"averageResponseTime"`
TotalThroughput float64 `json:"totalThroughput"`
OverallErrorRate float64 `json:"overallErrorRate"`
CacheHitRate float64 `json:"cacheHitRate"`
Bottlenecks []PerformanceBottleneck `json:"bottlenecks"`
Trends map[string]PerformanceTrend `json:"trends"`
}
type PerformanceBottleneck ¶
type PerformanceBottleneck struct {
Phase interfaces.ProcessingPhase `json:"phase"`
Type string `json:"type"` // cpu, memory, io, queue, external
Severity string `json:"severity"` // low, medium, high, critical
Description string `json:"description"`
Impact float64 `json:"impact"` // 0.0 to 1.0
}
type PerformanceConfig ¶
type PerformanceConfig struct {
MetricsCollectionInterval time.Duration `json:"metricsCollectionInterval"`
AnalysisInterval time.Duration `json:"analysisInterval"`
CPUScaleUpThreshold float64 `json:"cpuScaleUpThreshold"`
CPUScaleDownThreshold float64 `json:"cpuScaleDownThreshold"`
MemoryScaleUpThreshold float64 `json:"memoryScaleUpThreshold"`
MemoryScaleDownThreshold float64 `json:"memoryScaleDownThreshold"`
QueueDepthThreshold int `json:"queueDepthThreshold"`
ResponseTimeThreshold time.Duration `json:"responseTimeThreshold"`
MaxConnectionsPerPool int `json:"maxConnectionsPerPool"`
ConnectionIdleTimeout time.Duration `json:"connectionIdleTimeout"`
ConnectionMaxLifetime time.Duration `json:"connectionMaxLifetime"`
L1CacheSize int64 `json:"l1CacheSize"`
L2CacheSize int64 `json:"l2CacheSize"`
DefaultCacheTTL time.Duration `json:"defaultCacheTTL"`
Profiles map[string]PerformanceProfile `json:"profiles"`
}
type PerformanceManager ¶
type PerformanceManager struct {
// contains filtered or unexported fields
}
func NewPerformanceManager ¶
func NewPerformanceManager(config *PerformanceConfig, logger logr.Logger) *PerformanceManager
func (*PerformanceManager) AutoOptimize ¶
func (pm *PerformanceManager) AutoOptimize(ctx context.Context) error
func (*PerformanceManager) GetPerformanceRecommendations ¶
func (pm *PerformanceManager) GetPerformanceRecommendations(ctx context.Context) (*PerformanceRecommendations, error)
func (*PerformanceManager) OptimizeForProfile ¶
func (pm *PerformanceManager) OptimizeForProfile(ctx context.Context, profileName string, phase interfaces.ProcessingPhase) error
type PerformanceProfile ¶
type PerformanceProfile struct {
Name string `json:"name"`
Description string `json:"description"`
MaxConcurrentOperations int `json:"maxConcurrentOperations"`
TimeoutSettings TimeoutProfile `json:"timeoutSettings"`
CachingStrategy CachingProfile `json:"cachingStrategy"`
ResourceLimits ResourceProfile `json:"resourceLimits"`
ScalingPolicy ScalingProfile `json:"scalingPolicy"`
}
type PerformanceRecommendations ¶
type PerformanceRecommendations struct {
Timestamp time.Time `json:"timestamp"`
CurrentMetrics *SystemMetrics `json:"currentMetrics"`
Analysis *PerformanceAnalysis `json:"analysis"`
Recommendations []Recommendation `json:"recommendations"`
}
type PerformanceTrend ¶
type Recommendation ¶
type Recommendation struct {
Type string `json:"type"` // scaling, caching, resource, performance
Priority string `json:"priority"` // low, medium, high, critical
Description string `json:"description"`
Action string `json:"action"` // scale_up, scale_down, optimize_cache, etc.
Parameters json.RawMessage `json:"parameters"`
Confidence float64 `json:"confidence"` // 0.0 to 1.0
}
type ResourceMonitor ¶
type ResourceMonitor struct {
// contains filtered or unexported fields
}
func NewResourceMonitor ¶
func NewResourceMonitor(logger logr.Logger) *ResourceMonitor
func (*ResourceMonitor) CollectMetrics ¶
func (rm *ResourceMonitor) CollectMetrics(ctx context.Context)
func (*ResourceMonitor) GetCurrentMetrics ¶
func (rm *ResourceMonitor) GetCurrentMetrics() *SystemMetrics
func (*ResourceMonitor) GetMetricsHistory ¶
func (rm *ResourceMonitor) GetMetricsHistory(duration time.Duration) []SystemMetrics
type ResourceProfile ¶
type ScalingDecision ¶
type ScalingDecision struct {
Action string `json:"action"` // scale_up, scale_down, no_action
Phase interfaces.ProcessingPhase `json:"phase"` // which phase to scale
CurrentReplicas int `json:"currentReplicas"`
TargetReplicas int `json:"targetReplicas"`
Reason string `json:"reason"`
Confidence float64 `json:"confidence"`
Timestamp time.Time `json:"timestamp"`
}
type ScalingDecisionEngine ¶
type ScalingDecisionEngine struct {
// contains filtered or unexported fields
}
func NewScalingDecisionEngine ¶
func NewScalingDecisionEngine(config *PerformanceConfig, logger logr.Logger) *ScalingDecisionEngine
func (*ScalingDecisionEngine) ApplyScalingProfile ¶
func (sde *ScalingDecisionEngine) ApplyScalingProfile(profile ScalingProfile)
func (*ScalingDecisionEngine) EvaluateScaling ¶
func (sde *ScalingDecisionEngine) EvaluateScaling(ctx context.Context, metrics *SystemMetrics) []ScalingDecision
type ScalingPolicy ¶
type ScalingProfile ¶
type ScalingProfile struct {
MinReplicas int `json:"minReplicas"`
MaxReplicas int `json:"maxReplicas"`
ScaleUpPolicy ScalingPolicy `json:"scaleUpPolicy"`
ScaleDownPolicy ScalingPolicy `json:"scaleDownPolicy"`
}
type SystemMetrics ¶
type SystemMetrics struct {
Timestamp time.Time `json:"timestamp"`
CPUUtilization float64 `json:"cpuUtilization"`
MemoryUtilization float64 `json:"memoryUtilization"`
NetworkIO NetworkIOMetrics `json:"networkIO"`
DiskIO DiskIOMetrics `json:"diskIO"`
QueueDepths map[interfaces.ProcessingPhase]int `json:"queueDepths"`
ResponseTimes map[interfaces.ProcessingPhase]time.Duration `json:"responseTimes"`
ThroughputRates map[interfaces.ProcessingPhase]float64 `json:"throughputRates"`
ErrorRates map[interfaces.ProcessingPhase]float64 `json:"errorRates"`
CacheMetrics *CacheMetrics `json:"cacheMetrics"`
ConnectionMetrics *ConnectionMetrics `json:"connectionMetrics"`
}
type TimeoutProfile ¶
type TimeoutProfile struct {
LLMProcessing time.Duration `json:"llmProcessing"`
ResourcePlanning time.Duration `json:"resourcePlanning"`
ManifestGeneration time.Duration `json:"manifestGeneration"`
GitOpsCommit time.Duration `json:"gitOpsCommit"`
DeploymentVerification time.Duration `json:"deploymentVerification"`
}
Click to show internal directories.
Click to hide internal directories.