Documentation
¶
Index ¶
- Constants
- Variables
- func CosineSimilarity(a, b []float32) float64
- func EuclideanDistance(a, b []float32) float64
- func NetworkIntentPhaseToProcessingPhase(phase nephoranv1.NetworkIntentPhase) interfaces.ProcessingPhase
- func NetworkIntentPhaseToString(phase nephoranv1.NetworkIntentPhase) string
- func Normalize(vector []float32) []float32
- func ProcessingPhaseToNetworkIntentPhase(phase interfaces.ProcessingPhase) nephoranv1.NetworkIntentPhase
- func Sqrt(x float64) float64
- func StringToNetworkIntentPhase(phase string) nephoranv1.NetworkIntentPhase
- func ValidateClientInterface(client ClientInterface) error
- type BatchProcessor
- type CPUManager
- type CacheConfig
- type CacheEntry
- type CacheEntryStats
- type CacheOptimizer
- type CacheStats
- type ChatMessage
- type ClientError
- type ClientFactory
- type ClientInterface
- type ClientMetrics
- type ClientStatus
- type ComponentStatus
- type ComponentType
- type ConfigChangeNotifier
- type ConfigStatus
- type ConfigValidator
- type ConfigWatcher
- type ConfigurationManager
- func (cm *ConfigurationManager) GetAllConfigTypes() []string
- func (cm *ConfigurationManager) GetConfigurationStatus() map[string]ConfigStatus
- func (cm *ConfigurationManager) GetName() string
- func (cm *ConfigurationManager) IsHealthy() bool
- func (cm *ConfigurationManager) LoadConfiguration(configType string, target interface{}) error
- func (cm *ConfigurationManager) RegisterBuiltinValidators()
- func (cm *ConfigurationManager) RegisterChangeNotifier(notifier ConfigChangeNotifier)
- func (cm *ConfigurationManager) RegisterConfigFile(configType, filePath string) error
- func (cm *ConfigurationManager) RegisterValidator(validator ConfigValidator)
- func (cm *ConfigurationManager) ReloadAllConfigurations() error
- func (cm *ConfigurationManager) ReloadConfiguration(configType string) error
- func (cm *ConfigurationManager) SaveConfiguration(configType string, config interface{}) error
- func (cm *ConfigurationManager) Start(ctx context.Context) error
- func (cm *ConfigurationManager) Stop(ctx context.Context) error
- type Connection
- type ConnectionPool
- type ControllerInterface
- type CoordinationConfig
- type CoordinationManager
- func (cm *CoordinationManager) ProcessIntent(ctx context.Context, intentName types.NamespacedName) error
- func (cm *CoordinationManager) RegisterController(controller ControllerInterface) error
- func (cm *CoordinationManager) RegisterPhaseExecutor(phase interfaces.ProcessingPhase, executor PhaseExecutor)
- func (cm *CoordinationManager) Start(ctx context.Context) error
- func (cm *CoordinationManager) Stop(ctx context.Context) error
- func (cm *CoordinationManager) TransitionPhase(ctx context.Context, intentName types.NamespacedName, ...) error
- type CoordinationManagerAdapter
- type DeadLetterEvent
- type DeadLetterQueue
- type DocumentType
- type EmbeddingServiceInterface
- type EnhancedClientInterface
- type EnhancedEventBus
- func (eb *EnhancedEventBus) AddEventFilter(eventType string, filter EventFilter)
- func (eb *EnhancedEventBus) AddEventRoute(eventType string, targetComponents []string)
- func (eb *EnhancedEventBus) GetEventHistory(ctx context.Context, intentID string) ([]ProcessingEvent, error)
- func (eb *EnhancedEventBus) GetEventsByType(ctx context.Context, eventType string, limit int) ([]ProcessingEvent, error)
- func (eb *EnhancedEventBus) Publish(ctx context.Context, event ProcessingEvent) error
- func (eb *EnhancedEventBus) PublishStateChange(ctx context.Context, event StateChangeEvent) error
- func (eb *EnhancedEventBus) Start(ctx context.Context) error
- func (eb *EnhancedEventBus) Stop(ctx context.Context) error
- func (eb *EnhancedEventBus) Subscribe(eventType string, handler EventHandler) error
- func (eb *EnhancedEventBus) Unsubscribe(eventType string) error
- type EnhancedEventBusAdapter
- type ErrorStrategy
- type EventBus
- type EventBusConfig
- type EventBusMetrics
- type EventBusMetricsImpl
- func (m *EventBusMetricsImpl) GetAverageProcessingTime() int64
- func (m *EventBusMetricsImpl) GetBufferUtilization() float64
- func (m *EventBusMetricsImpl) GetFailedHandlers() int64
- func (m *EventBusMetricsImpl) GetTotalEventsProcessed() int64
- func (m *EventBusMetricsImpl) GetTotalEventsPublished() int64
- func (m *EventBusMetricsImpl) RecordEventProcessed(processingTime time.Duration)
- func (m *EventBusMetricsImpl) RecordEventPublished(eventType string)
- func (m *EventBusMetricsImpl) RecordHandlerFailure()
- func (m *EventBusMetricsImpl) SetBufferUtilization(utilization float64)
- func (m *EventBusMetricsImpl) SetPartitionCount(count int)
- type EventFilter
- type EventHandler
- type EventHealthChecker
- type EventLog
- type EventOrdering
- type EventPartition
- type ExecutionQueue
- func (eq *ExecutionQueue) CancelTask(intentName types.NamespacedName, phase interfaces.ProcessingPhase) error
- func (eq *ExecutionQueue) CleanupExpiredTasks() int
- func (eq *ExecutionQueue) CompleteTask(task *ExecutionTask)
- func (eq *ExecutionQueue) Dequeue() (*ExecutionTask, error)
- func (eq *ExecutionQueue) Enqueue(task *ExecutionTask) error
- func (eq *ExecutionQueue) FailTask(task *ExecutionTask, err error) error
- func (eq *ExecutionQueue) FilterTasks(filter *TaskFilter, includeActive, includePending, includeCompleted bool) []*ExecutionTask
- func (eq *ExecutionQueue) GetActiveCount() int
- func (eq *ExecutionQueue) GetPendingCount() int
- func (eq *ExecutionQueue) GetStats() *QueueStats
- func (eq *ExecutionQueue) ListActiveTasks() []*ExecutionTask
- func (eq *ExecutionQueue) ListPendingTasks() []*ExecutionTask
- type ExecutionTask
- type GenericRateLimiterConfig
- type HealthCheck
- type HealthChecker
- type HealthStatus
- type IOOptimizer
- type IntegrationConfig
- type IntegrationConfigValidator
- type IntegrationManager
- func (im *IntegrationManager) GetCoordinationManager() *CoordinationManager
- func (im *IntegrationManager) GetEventBus() EventBus
- func (im *IntegrationManager) GetMetrics() map[string]interface{}
- func (im *IntegrationManager) GetPerformanceOptimizer() *PerformanceOptimizer
- func (im *IntegrationManager) GetRecoveryManager() *RecoveryManager
- func (im *IntegrationManager) GetStateManager() *StateManager
- func (im *IntegrationManager) GetSystemHealth() *SystemHealth
- func (im *IntegrationManager) RegisterController(controller ControllerInterface) error
- func (im *IntegrationManager) RegisterHealthChecker(checker HealthChecker)
- func (im *IntegrationManager) RegisterWebhook(name string, webhook WebhookInterface) error
- func (im *IntegrationManager) SetupWithManager() error
- func (im *IntegrationManager) Start(ctx context.Context) error
- func (im *IntegrationManager) Stop(ctx context.Context) error
- type IntentDependency
- type IntentState
- type LLMError
- type LLMRequest
- type LLMResponse
- type LatencyTracker
- type Lock
- type LockManager
- func (lm *LockManager) AcquireLock(ctx context.Context, key string) error
- func (lm *LockManager) AcquireLockWithOptions(ctx context.Context, key string, opts *LockOptions) error
- func (lm *LockManager) ActiveLocks() int
- func (lm *LockManager) GetLock(key string) (*Lock, bool)
- func (lm *LockManager) GetStats() *LockStats
- func (lm *LockManager) IsLocked(key string) bool
- func (lm *LockManager) ListLocks() []*Lock
- func (lm *LockManager) LockWithContext(ctx context.Context, key string, fn func() error) error
- func (lm *LockManager) ReleaseLock(key string) error
- func (lm *LockManager) RenewLock(key string, duration time.Duration) error
- func (lm *LockManager) Stop()
- func (lm *LockManager) TryLockWithTimeout(ctx context.Context, key string, timeout time.Duration) error
- type LockOptions
- type LockStats
- type MainIntegration
- type MemoryManager
- type MetricError
- type MetricsCollector
- type ModelCapabilities
- type PerformanceConfig
- type PerformanceMetric
- type PerformanceMonitor
- type PerformanceOptimizer
- func (po *PerformanceOptimizer) CreateBatchProcessor(name string, batchSize int, processor func([]interface{}) error) *BatchProcessor
- func (po *PerformanceOptimizer) CreateConnectionPool(name string, factory func() (Connection, error), maxSize int) *ConnectionPool
- func (po *PerformanceOptimizer) GetBatchProcessor(name string) *BatchProcessor
- func (po *PerformanceOptimizer) GetConnectionPool(name string) *ConnectionPool
- func (po *PerformanceOptimizer) OptimizeCPUUsage(ctx context.Context) error
- func (po *PerformanceOptimizer) OptimizeCachePerformance(ctx context.Context) error
- func (po *PerformanceOptimizer) OptimizeIOPerformance(ctx context.Context) error
- func (po *PerformanceOptimizer) OptimizeMemoryUsage(ctx context.Context) error
- func (po *PerformanceOptimizer) Start(ctx context.Context) error
- func (po *PerformanceOptimizer) Stop(ctx context.Context) error
- type PerformanceOptimizerAdapter
- type PhaseExecutor
- type PhaseMetrics
- type PhaseTransition
- type ProcessingEvent
- type QueryRequest
- type QueueStats
- type RAGError
- type RAGResponse
- type RAGServiceInterface
- type RecoveryAction
- type RecoveryAttempt
- type RecoveryCondition
- type RecoveryConfig
- type RecoveryHandler
- type RecoveryManager
- func (rm *RecoveryManager) GetRecoveryHistory(intentName types.NamespacedName) []*RecoveryAttempt
- func (rm *RecoveryManager) GetRecoveryStats() *RecoveryStats
- func (rm *RecoveryManager) RecoverIntent(ctx context.Context, intentName types.NamespacedName, ...) error
- func (rm *RecoveryManager) RegisterRecoveryStrategy(phase interfaces.ProcessingPhase, strategy *RecoveryStrategy)
- func (rm *RecoveryManager) Start(ctx context.Context) error
- func (rm *RecoveryManager) Stop(ctx context.Context) error
- type RecoveryManagerAdapter
- type RecoveryStats
- type RecoveryStrategy
- type RequestOption
- type RequestOptions
- type ResourceAllocation
- type ResourceLock
- type ResourceUsage
- type Result
- type RetryPolicy
- type SearchQuery
- type SearchResponse
- type SearchResult
- type SimpleEventFilter
- type StartableComponent
- type StateCache
- func (c *StateCache) Cleanup() int
- func (c *StateCache) Clear()
- func (c *StateCache) Contains(key string) bool
- func (c *StateCache) Delete(key string) bool
- func (c *StateCache) Get(key string) interface{}
- func (c *StateCache) GetMostRecent() (string, interface{}, bool)
- func (c *StateCache) GetMultiple(keys []string) map[string]interface{}
- func (c *StateCache) GetOldest() (string, interface{}, bool)
- func (c *StateCache) GetWithStats(key string) (interface{}, *CacheEntryStats)
- func (c *StateCache) Keys() []string
- func (c *StateCache) Set(key string, value interface{}, ttl time.Duration)
- func (c *StateCache) SetMultiple(entries map[string]interface{}, ttl time.Duration)
- func (c *StateCache) SetWithCallback(key string, value interface{}, ttl time.Duration, ...)
- func (c *StateCache) Size() int
- func (c *StateCache) Stats() *CacheStats
- func (c *StateCache) Stop()
- type StateChangeEvent
- type StateCondition
- type StateConflict
- type StateManager
- func (sm *StateManager) AddDependency(ctx context.Context, intentName, dependsOnIntent types.NamespacedName) error
- func (sm *StateManager) CheckDependencies(ctx context.Context, namespacedName types.NamespacedName) (bool, []string, error)
- func (sm *StateManager) GetIntentState(ctx context.Context, namespacedName types.NamespacedName) (*IntentState, error)
- func (sm *StateManager) GetPhaseData(ctx context.Context, namespacedName types.NamespacedName, ...) (interface{}, error)
- func (sm *StateManager) GetStatistics() *StateStatistics
- func (sm *StateManager) ListStates(ctx context.Context, namespace string, labelSelector map[string]string) ([]*IntentState, error)
- func (sm *StateManager) SetPhaseData(ctx context.Context, namespacedName types.NamespacedName, ...) error
- func (sm *StateManager) SetPhaseError(ctx context.Context, namespacedName types.NamespacedName, ...) error
- func (sm *StateManager) Start(ctx context.Context) error
- func (sm *StateManager) Stop(ctx context.Context) error
- func (sm *StateManager) TransitionPhase(ctx context.Context, namespacedName types.NamespacedName, ...) error
- func (sm *StateManager) UpdateIntentState(ctx context.Context, namespacedName types.NamespacedName, ...) error
- type StateManagerAdapter
- type StateManagerConfig
- type StateManagerConfigValidator
- type StateMetrics
- func (sm *StateMetrics) GetAverageUpdateTime() time.Duration
- func (sm *StateMetrics) GetCacheHitRate() float64
- func (sm *StateMetrics) GetLastSyncTime() time.Time
- func (sm *StateMetrics) GetMetrics() *StateMetricsSnapshot
- func (sm *StateMetrics) GetRecentErrors(count int) []MetricError
- func (sm *StateMetrics) GetValidationErrors() int64
- func (sm *StateMetrics) RecordActiveLocks(count int)
- func (sm *StateMetrics) RecordCPUUsage(percent float64)
- func (sm *StateMetrics) RecordCacheCleanup()
- func (sm *StateMetrics) RecordCacheHit()
- func (sm *StateMetrics) RecordCacheMiss()
- func (sm *StateMetrics) RecordCacheSize(size int64)
- func (sm *StateMetrics) RecordConflictResolution()
- func (sm *StateMetrics) RecordDiskUsage(bytes int64)
- func (sm *StateMetrics) RecordError(operation, errorMsg, context, severity string)
- func (sm *StateMetrics) RecordLockAcquisition()
- func (sm *StateMetrics) RecordLockRelease()
- func (sm *StateMetrics) RecordLockTimeout()
- func (sm *StateMetrics) RecordMemoryUsage(bytes int64)
- func (sm *StateMetrics) RecordStateSync()
- func (sm *StateMetrics) RecordStateSyncTime(duration time.Duration)
- func (sm *StateMetrics) RecordStateUpdate()
- func (sm *StateMetrics) RecordStateUpdateTime(duration time.Duration)
- func (sm *StateMetrics) RecordValidationError()
- type StateMetricsSnapshot
- type StateMutex
- type StateQuery
- type StateQueryResult
- type StateRecoveryInfo
- type StateSnapshot
- type StateStatistics
- type StateSyncRequest
- type StateSyncResponse
- type StateValidationError
- type StateValidationResult
- type StateValidationWarning
- type StreamingChunk
- type SystemHealth
- type TaskFilter
- type TaskHeap
- type TelecomDocument
- type ThroughputTracker
- type TokenUsage
- type VectorStoreInterface
- type WebhookInterface
Constants ¶
const ( ConditionTypeReady = "Ready" ConditionTypeProgressing = "Progressing" ConditionTypeDegraded = "Degraded" ConditionTypeAvailable = "Available" ConditionTypeError = "Error" ConditionTypeDependenciesMet = "DependenciesMet" ConditionTypeResourcesAllocated = "ResourcesAllocated" ConditionTypeValidated = "Validated" ConditionStatusTrue = "True" ConditionStatusFalse = "False" ConditionStatusUnknown = "Unknown" DependencyTypeBlocking = "blocking" DependencyTypeSoft = "soft" DependencyTypeNotification = "notification" ResourceStatusAllocated = "allocated" ResourceStatusReleased = "released" ResourceStatusPending = "pending" ResourceStatusFailed = "failed" LockTypeExclusive = "exclusive" ConflictResolutionLatest = "latest" ConflictResolutionMerge = "merge" ConflictResolutionManual = "manual" SyncTypeFull = "full" SyncTypeIncremental = "incremental" SyncTypeValidate = "validate" SeverityLow = "low" SeverityMedium = "medium" SeverityHigh = "high" SeverityCritical = "critical" )
Variables ¶
var ( ErrClientClosed = errors.New("client is closed") ErrInvalidRequest = errors.New("invalid request") ErrRateLimited = errors.New("rate limited") )
Standard errors for interface implementations
var ( DefaultRequestOptions = RequestOptions{ Timeout: 30 * time.Second, RetryPolicy: &RetryPolicy{ MaxRetries: 3, BackoffBase: time.Second, BackoffMax: 10 * time.Second, BackoffJitter: true, RetryableErrors: nil, }, } DefaultRateLimiter = GenericRateLimiterConfig{ RequestsPerSecond: 10.0, BurstSize: 5, Timeout: 5 * time.Second, } )
Default configurations following Go 1.24 best practices
Functions ¶
func CosineSimilarity ¶
CosineSimilarity calculates the cosine similarity between two vectors
func EuclideanDistance ¶
EuclideanDistance calculates the Euclidean distance between two vectors
func NetworkIntentPhaseToProcessingPhase ¶
func NetworkIntentPhaseToProcessingPhase(phase nephoranv1.NetworkIntentPhase) interfaces.ProcessingPhase
func NetworkIntentPhaseToString ¶
func NetworkIntentPhaseToString(phase nephoranv1.NetworkIntentPhase) string
func ProcessingPhaseToNetworkIntentPhase ¶
func ProcessingPhaseToNetworkIntentPhase(phase interfaces.ProcessingPhase) nephoranv1.NetworkIntentPhase
func Sqrt ¶
Sqrt calculates the square root of x Consolidated from pkg/rag/optimized_rag_pipeline.go and pkg/rag/embedding_service_interface.go
func StringToNetworkIntentPhase ¶
func StringToNetworkIntentPhase(phase string) nephoranv1.NetworkIntentPhase
func ValidateClientInterface ¶
func ValidateClientInterface(client ClientInterface) error
ValidateClientInterface checks if a client properly implements the interface
Types ¶
type BatchProcessor ¶
type BatchProcessor struct {
// contains filtered or unexported fields
}
func (*BatchProcessor) Add ¶
func (bp *BatchProcessor) Add(item interface{})
func (*BatchProcessor) Stop ¶
func (bp *BatchProcessor) Stop()
type CPUManager ¶
type CPUManager struct {
// contains filtered or unexported fields
}
func NewCPUManager ¶
func NewCPUManager(maxCPU, throttleThreshold float64) *CPUManager
type CacheConfig ¶
type CacheConfig struct {
MaxSize int `json:"maxSize"`
DefaultTTL time.Duration `json:"defaultTTL"`
CleanupInterval time.Duration `json:"cleanupInterval"`
EvictionPolicy string `json:"evictionPolicy"` // "lru", "lfu", "ttl"
MaxMemoryMB int64 `json:"maxMemoryMB"`
EnableStatistics bool `json:"enableStatistics"`
EnableMetrics bool `json:"enableMetrics"`
}
func DefaultCacheConfig ¶
func DefaultCacheConfig() *CacheConfig
type CacheEntry ¶
type CacheEntryStats ¶
type CacheOptimizer ¶
type CacheOptimizer struct {
// contains filtered or unexported fields
}
func NewCacheOptimizer ¶
func NewCacheOptimizer(hitRateThreshold float64, evictionStrategy string, sizeThreshold int64, ) *CacheOptimizer
type CacheStats ¶
type ChatMessage ¶
type ChatMessage struct {
Role string `json:"role"` // system, user, assistant
Content string `json:"content"`
}
ChatMessage represents a chat message
type ClientError ¶
type ClientError struct {
Op string // operation that failed
Client string // client identifier
Err error // underlying error
}
ClientError wraps client-specific errors with context (Go 1.24 error patterns)
func NewClientError ¶
func NewClientError(op, client string, err error) *ClientError
NewClientError creates a new client error with structured context
func (*ClientError) Error ¶
func (e *ClientError) Error() string
func (*ClientError) Unwrap ¶
func (e *ClientError) Unwrap() error
type ClientFactory ¶
type ClientFactory[T ClientInterface] interface { Create(config interface{}) (T, error) Validate(client T) error }
ClientFactory creates clients with compile-time type safety
type ClientInterface ¶
type ClientInterface interface {
// Basic operations
ProcessRequest(ctx context.Context, request *LLMRequest) (*LLMResponse, error)
ProcessStreamingRequest(ctx context.Context, request *LLMRequest) (<-chan *StreamingChunk, error)
ProcessIntent(ctx context.Context, intent string) (string, error)
// Health and status
HealthCheck(ctx context.Context) error
GetStatus() ClientStatus
// Configuration
GetModelCapabilities() ModelCapabilities
GetEndpoint() string
Close() error
}
ClientInterface defines the standard LLM client interface
type ClientMetrics ¶
type ClientMetrics struct {
RequestCount int64 `json:"request_count"`
ErrorCount int64 `json:"error_count"`
AverageLatency time.Duration `json:"average_latency"`
P95Latency time.Duration `json:"p95_latency"`
TotalTokensUsed int64 `json:"total_tokens_used"`
LastReset time.Time `json:"last_reset"`
}
ClientMetrics provides client performance metrics
type ClientStatus ¶
type ClientStatus string
ClientStatus represents the status of a client
const ( ClientStatusHealthy ClientStatus = "healthy" ClientStatusUnhealthy ClientStatus = "unhealthy" ClientStatusMaintenance ClientStatus = "maintenance" )
type ComponentStatus ¶
type ComponentStatus struct {
Type ComponentType `json:"type"`
Name string `json:"name"`
Status string `json:"status"`
Healthy bool `json:"healthy"`
LastUpdate time.Time `json:"lastUpdate"`
Version string `json:"version,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
Metrics map[string]float64 `json:"metrics,omitempty"`
Errors []string `json:"errors,omitempty"`
}
type ComponentType ¶
type ComponentType string
const ( ComponentTypeLLMProcessor ComponentType = "llm-processor" ComponentTypeResourcePlanner ComponentType = "resource-planner" ComponentTypeManifestGenerator ComponentType = "manifest-generator" ComponentTypeGitOpsController ComponentType = "gitops-controller" ComponentTypeDeploymentVerifier ComponentType = "deployment-verifier" ComponentTypeRAGSystem ComponentType = "rag-system" ComponentTypeNephioIntegration ComponentType = "nephio-integration" ComponentTypeAuthentication ComponentType = "authentication" ComponentTypeDatabase ComponentType = "database" ComponentTypeCache ComponentType = "cache" ComponentTypeKubernetes ComponentType = "kubernetes" ComponentTypeNetworking ComponentType = "networking" )
type ConfigChangeNotifier ¶
type ConfigStatus ¶
type ConfigStatus struct {
Type string `json:"type"`
Loaded bool `json:"loaded"`
HasFile bool `json:"hasFile"`
FilePath string `json:"filePath,omitempty"`
LastLoaded time.Time `json:"lastLoaded"`
LastModified time.Time `json:"lastModified,omitempty"`
Valid bool `json:"valid"`
ValidationError string `json:"validationError,omitempty"`
}
type ConfigValidator ¶
type ConfigWatcher ¶
type ConfigWatcher struct {
// contains filtered or unexported fields
}
type ConfigurationManager ¶
type ConfigurationManager struct {
// contains filtered or unexported fields
}
func NewConfigurationManager ¶
func NewConfigurationManager(configDir string) *ConfigurationManager
func (*ConfigurationManager) GetAllConfigTypes ¶
func (cm *ConfigurationManager) GetAllConfigTypes() []string
func (*ConfigurationManager) GetConfigurationStatus ¶
func (cm *ConfigurationManager) GetConfigurationStatus() map[string]ConfigStatus
func (*ConfigurationManager) GetName ¶
func (cm *ConfigurationManager) GetName() string
func (*ConfigurationManager) IsHealthy ¶
func (cm *ConfigurationManager) IsHealthy() bool
func (*ConfigurationManager) LoadConfiguration ¶
func (cm *ConfigurationManager) LoadConfiguration(configType string, target interface{}) error
func (*ConfigurationManager) RegisterBuiltinValidators ¶
func (cm *ConfigurationManager) RegisterBuiltinValidators()
func (*ConfigurationManager) RegisterChangeNotifier ¶
func (cm *ConfigurationManager) RegisterChangeNotifier(notifier ConfigChangeNotifier)
func (*ConfigurationManager) RegisterConfigFile ¶
func (cm *ConfigurationManager) RegisterConfigFile(configType, filePath string) error
func (*ConfigurationManager) RegisterValidator ¶
func (cm *ConfigurationManager) RegisterValidator(validator ConfigValidator)
func (*ConfigurationManager) ReloadAllConfigurations ¶
func (cm *ConfigurationManager) ReloadAllConfigurations() error
func (*ConfigurationManager) ReloadConfiguration ¶
func (cm *ConfigurationManager) ReloadConfiguration(configType string) error
func (*ConfigurationManager) SaveConfiguration ¶
func (cm *ConfigurationManager) SaveConfiguration(configType string, config interface{}) error
type Connection ¶
type ConnectionPool ¶
type ConnectionPool struct {
// contains filtered or unexported fields
}
func (*ConnectionPool) Close ¶
func (cp *ConnectionPool) Close()
func (*ConnectionPool) Get ¶
func (cp *ConnectionPool) Get(ctx context.Context) (Connection, error)
func (*ConnectionPool) Return ¶
func (cp *ConnectionPool) Return(conn Connection)
type ControllerInterface ¶
type ControllerInterface interface {
GetComponentType() ComponentType
ProcessPhase(ctx context.Context, intent types.NamespacedName, phase interfaces.ProcessingPhase, data interface{}) error
IsHealthy() bool
GetMetrics() map[string]interface{}
ValidatePhaseData(phase interfaces.ProcessingPhase, data interface{}) error
}
type CoordinationConfig ¶
type CoordinationConfig struct {
MaxConcurrentIntents int `json:"maxConcurrentIntents"`
DefaultPhaseTimeout time.Duration `json:"defaultPhaseTimeout"`
PhaseTransitionTimeout time.Duration `json:"phaseTransitionTimeout"`
EnableParallelProcessing bool `json:"enableParallelProcessing"`
ParallelLimits map[interfaces.ProcessingPhase]int `json:"parallelLimits"`
ParallelGroups map[string][]interfaces.ProcessingPhase `json:"parallelGroups"`
MaxRetryAttempts int `json:"maxRetryAttempts"`
RetryBackoff time.Duration `json:"retryBackoff"`
ErrorStrategies map[interfaces.ProcessingPhase]ErrorStrategy `json:"errorStrategies"`
HealthCheckInterval time.Duration `json:"healthCheckInterval"`
UnhealthyThreshold int `json:"unhealthyThreshold"`
WorkerPoolSize int `json:"workerPoolSize"`
QueueCapacity int `json:"queueCapacity"`
BatchProcessing bool `json:"batchProcessing"`
BatchSize int `json:"batchSize"`
}
func DefaultCoordinationConfig ¶
func DefaultCoordinationConfig() *CoordinationConfig
type CoordinationManager ¶
type CoordinationManager struct {
// contains filtered or unexported fields
}
func NewCoordinationManager ¶
func NewCoordinationManager(stateManager *StateManager, eventBus EventBus, config *CoordinationConfig) *CoordinationManager
func (*CoordinationManager) ProcessIntent ¶
func (cm *CoordinationManager) ProcessIntent(ctx context.Context, intentName types.NamespacedName) error
func (*CoordinationManager) RegisterController ¶
func (cm *CoordinationManager) RegisterController(controller ControllerInterface) error
func (*CoordinationManager) RegisterPhaseExecutor ¶
func (cm *CoordinationManager) RegisterPhaseExecutor(phase interfaces.ProcessingPhase, executor PhaseExecutor)
func (*CoordinationManager) TransitionPhase ¶
func (cm *CoordinationManager) TransitionPhase(ctx context.Context, intentName types.NamespacedName, fromPhase, toPhase interfaces.ProcessingPhase, data interface{}) error
type CoordinationManagerAdapter ¶
type CoordinationManagerAdapter struct {
*CoordinationManager
}
func (*CoordinationManagerAdapter) GetName ¶
func (cma *CoordinationManagerAdapter) GetName() string
func (*CoordinationManagerAdapter) IsHealthy ¶
func (cma *CoordinationManagerAdapter) IsHealthy() bool
type DeadLetterEvent ¶
type DeadLetterQueue ¶
type DeadLetterQueue struct {
// contains filtered or unexported fields
}
func NewDeadLetterQueue ¶
func NewDeadLetterQueue(enabled bool) *DeadLetterQueue
func (*DeadLetterQueue) Add ¶
func (dlq *DeadLetterQueue) Add(event ProcessingEvent, err error)
func (*DeadLetterQueue) Clear ¶
func (dlq *DeadLetterQueue) Clear()
func (*DeadLetterQueue) GetEvents ¶
func (dlq *DeadLetterQueue) GetEvents() []DeadLetterEvent
type DocumentType ¶
type DocumentType string
DocumentType represents the type of telecom document
const ( DocumentTypeSpec DocumentType = "specification" DocumentTypeStandard DocumentType = "standard" DocumentTypeGuide DocumentType = "guide" DocumentTypeAPI DocumentType = "api" DocumentTypeConfig DocumentType = "configuration" DocumentTypePolicy DocumentType = "policy" DocumentTypeOther DocumentType = "other" )
type EmbeddingServiceInterface ¶
type EmbeddingServiceInterface interface {
CreateEmbedding(ctx context.Context, text string) ([]float32, error)
CreateBatchEmbeddings(ctx context.Context, texts []string) ([][]float32, error)
CalculateSimilarity(ctx context.Context, text1, text2 string) (float32, error)
GetDimensions() int
GetModel() string
}
EmbeddingServiceInterface defines the interface for embedding service
type EnhancedClientInterface ¶
type EnhancedClientInterface interface {
ClientInterface
// Process request with options (Go 1.24 functional options pattern)
ProcessRequestWithOptions(ctx context.Context, request *LLMRequest, opts ...RequestOption) (*LLMResponse, error)
// Batch processing with structured concurrency
ProcessBatch(ctx context.Context, requests []*LLMRequest, opts ...RequestOption) ([]*LLMResponse, error)
// Health check with detailed status
HealthCheckDetailed(ctx context.Context) (*HealthStatus, error)
// Metrics and observability
GetMetrics(ctx context.Context) (*ClientMetrics, error)
}
EnhancedClientInterface extends ClientInterface with Go 1.24 patterns
type EnhancedEventBus ¶
type EnhancedEventBus struct {
// contains filtered or unexported fields
}
func NewEnhancedEventBus ¶
func NewEnhancedEventBus(config *EventBusConfig) *EnhancedEventBus
func (*EnhancedEventBus) AddEventFilter ¶
func (eb *EnhancedEventBus) AddEventFilter(eventType string, filter EventFilter)
func (*EnhancedEventBus) AddEventRoute ¶
func (eb *EnhancedEventBus) AddEventRoute(eventType string, targetComponents []string)
func (*EnhancedEventBus) GetEventHistory ¶
func (eb *EnhancedEventBus) GetEventHistory(ctx context.Context, intentID string) ([]ProcessingEvent, error)
func (*EnhancedEventBus) GetEventsByType ¶
func (eb *EnhancedEventBus) GetEventsByType(ctx context.Context, eventType string, limit int) ([]ProcessingEvent, error)
func (*EnhancedEventBus) Publish ¶
func (eb *EnhancedEventBus) Publish(ctx context.Context, event ProcessingEvent) error
func (*EnhancedEventBus) PublishStateChange ¶
func (eb *EnhancedEventBus) PublishStateChange(ctx context.Context, event StateChangeEvent) error
func (*EnhancedEventBus) Subscribe ¶
func (eb *EnhancedEventBus) Subscribe(eventType string, handler EventHandler) error
func (*EnhancedEventBus) Unsubscribe ¶
func (eb *EnhancedEventBus) Unsubscribe(eventType string) error
type EnhancedEventBusAdapter ¶
type EnhancedEventBusAdapter struct {
*EnhancedEventBus
}
func (*EnhancedEventBusAdapter) GetName ¶
func (eeba *EnhancedEventBusAdapter) GetName() string
func (*EnhancedEventBusAdapter) IsHealthy ¶
func (eeba *EnhancedEventBusAdapter) IsHealthy() bool
type ErrorStrategy ¶
type EventBus ¶
type EventBus interface {
PublishStateChange(ctx context.Context, event StateChangeEvent) error
Subscribe(eventType string, handler EventHandler) error
Unsubscribe(eventType string) error
Start(ctx context.Context) error
Stop(ctx context.Context) error
GetEventHistory(ctx context.Context, intentID string) ([]ProcessingEvent, error)
GetEventsByType(ctx context.Context, eventType string, limit int) ([]ProcessingEvent, error)
}
type EventBusConfig ¶
type EventBusConfig struct {
BufferSize int `json:"bufferSize"`
MaxEventSize int64 `json:"maxEventSize"`
BatchSize int `json:"batchSize"`
BatchTimeout time.Duration `json:"batchTimeout"`
PersistenceDir string `json:"persistenceDir"`
EnablePersistence bool `json:"enablePersistence"`
LogRotationSize int64 `json:"logRotationSize"`
LogRetentionDays int `json:"logRetentionDays"`
MaxRetries int `json:"maxRetries"`
RetryBackoff time.Duration `json:"retryBackoff"`
AckTimeout time.Duration `json:"ackTimeout"`
DeadLetterEnabled bool `json:"deadLetterEnabled"`
OrderingMode string `json:"orderingMode"` // "none", "global", "partition"
PartitionStrategy string `json:"partitionStrategy"` // "intent", "component", "hash"
MaxPartitions int `json:"maxPartitions"`
EnableBatching bool `json:"enableBatching"`
EnableCompression bool `json:"enableCompression"`
CompressionLevel int `json:"compressionLevel"`
WorkerCount int `json:"workerCount"`
EnableMetrics bool `json:"enableMetrics"`
MetricsInterval time.Duration `json:"metricsInterval"`
HealthCheckInterval time.Duration `json:"healthCheckInterval"`
}
func DefaultEventBusConfig ¶
func DefaultEventBusConfig() *EventBusConfig
type EventBusMetrics ¶
type EventBusMetrics interface {
GetTotalEventsPublished() int64
GetTotalEventsProcessed() int64
GetFailedHandlers() int64
GetAverageProcessingTime() int64 // in milliseconds
GetBufferUtilization() float64
RecordEventPublished(eventType string)
RecordEventProcessed(processingTime time.Duration)
RecordHandlerFailure()
SetBufferUtilization(utilization float64)
SetPartitionCount(count int)
}
type EventBusMetricsImpl ¶
type EventBusMetricsImpl struct {
// contains filtered or unexported fields
}
func NewEventBusMetricsImpl ¶
func NewEventBusMetricsImpl() *EventBusMetricsImpl
func (*EventBusMetricsImpl) GetAverageProcessingTime ¶
func (m *EventBusMetricsImpl) GetAverageProcessingTime() int64
func (*EventBusMetricsImpl) GetBufferUtilization ¶
func (m *EventBusMetricsImpl) GetBufferUtilization() float64
func (*EventBusMetricsImpl) GetFailedHandlers ¶
func (m *EventBusMetricsImpl) GetFailedHandlers() int64
func (*EventBusMetricsImpl) GetTotalEventsProcessed ¶
func (m *EventBusMetricsImpl) GetTotalEventsProcessed() int64
func (*EventBusMetricsImpl) GetTotalEventsPublished ¶
func (m *EventBusMetricsImpl) GetTotalEventsPublished() int64
func (*EventBusMetricsImpl) RecordEventProcessed ¶
func (m *EventBusMetricsImpl) RecordEventProcessed(processingTime time.Duration)
func (*EventBusMetricsImpl) RecordEventPublished ¶
func (m *EventBusMetricsImpl) RecordEventPublished(eventType string)
func (*EventBusMetricsImpl) RecordHandlerFailure ¶
func (m *EventBusMetricsImpl) RecordHandlerFailure()
func (*EventBusMetricsImpl) SetBufferUtilization ¶
func (m *EventBusMetricsImpl) SetBufferUtilization(utilization float64)
func (*EventBusMetricsImpl) SetPartitionCount ¶
func (m *EventBusMetricsImpl) SetPartitionCount(count int)
type EventFilter ¶
type EventFilter interface {
ShouldProcess(event ProcessingEvent) bool
}
type EventHandler ¶
type EventHandler func(ctx context.Context, event ProcessingEvent) error
type EventHealthChecker ¶
type EventHealthChecker struct {
// contains filtered or unexported fields
}
func NewEventHealthChecker ¶
func NewEventHealthChecker(interval time.Duration) *EventHealthChecker
func (*EventHealthChecker) AddHealthCheck ¶
func (ehc *EventHealthChecker) AddHealthCheck(name string, check func() error)
func (*EventHealthChecker) IsHealthy ¶
func (ehc *EventHealthChecker) IsHealthy() bool
type EventLog ¶
type EventLog struct {
// contains filtered or unexported fields
}
func (*EventLog) GetEventsByIntentID ¶
func (el *EventLog) GetEventsByIntentID(intentID string) ([]ProcessingEvent, error)
func (*EventLog) GetEventsByType ¶
func (el *EventLog) GetEventsByType(eventType string, limit int) ([]ProcessingEvent, error)
func (*EventLog) WriteEvent ¶
func (el *EventLog) WriteEvent(event ProcessingEvent) error
type EventOrdering ¶
type EventOrdering struct {
// contains filtered or unexported fields
}
func NewEventOrdering ¶
func NewEventOrdering(mode, strategy string) EventOrdering
type EventPartition ¶
type EventPartition struct {
// contains filtered or unexported fields
}
func NewEventPartition ¶
func NewEventPartition(id string, maxSize int) *EventPartition
func (*EventPartition) AddEvent ¶
func (ep *EventPartition) AddEvent(event ProcessingEvent)
func (*EventPartition) GetEvents ¶
func (ep *EventPartition) GetEvents() []ProcessingEvent
type ExecutionQueue ¶
type ExecutionQueue struct {
// contains filtered or unexported fields
}
func NewExecutionQueue ¶
func NewExecutionQueue(capacity int) *ExecutionQueue
func (*ExecutionQueue) CancelTask ¶
func (eq *ExecutionQueue) CancelTask(intentName types.NamespacedName, phase interfaces.ProcessingPhase) error
func (*ExecutionQueue) CleanupExpiredTasks ¶
func (eq *ExecutionQueue) CleanupExpiredTasks() int
func (*ExecutionQueue) CompleteTask ¶
func (eq *ExecutionQueue) CompleteTask(task *ExecutionTask)
func (*ExecutionQueue) Dequeue ¶
func (eq *ExecutionQueue) Dequeue() (*ExecutionTask, error)
func (*ExecutionQueue) Enqueue ¶
func (eq *ExecutionQueue) Enqueue(task *ExecutionTask) error
func (*ExecutionQueue) FailTask ¶
func (eq *ExecutionQueue) FailTask(task *ExecutionTask, err error) error
func (*ExecutionQueue) FilterTasks ¶
func (eq *ExecutionQueue) FilterTasks(filter *TaskFilter, includeActive, includePending, includeCompleted bool) []*ExecutionTask
func (*ExecutionQueue) GetActiveCount ¶
func (eq *ExecutionQueue) GetActiveCount() int
func (*ExecutionQueue) GetPendingCount ¶
func (eq *ExecutionQueue) GetPendingCount() int
func (*ExecutionQueue) GetStats ¶
func (eq *ExecutionQueue) GetStats() *QueueStats
func (*ExecutionQueue) ListActiveTasks ¶
func (eq *ExecutionQueue) ListActiveTasks() []*ExecutionTask
func (*ExecutionQueue) ListPendingTasks ¶
func (eq *ExecutionQueue) ListPendingTasks() []*ExecutionTask
type ExecutionTask ¶
type ExecutionTask struct {
IntentName types.NamespacedName `json:"intentName"`
Phase interfaces.ProcessingPhase `json:"phase"`
Priority int `json:"priority"`
Timestamp time.Time `json:"timestamp"`
Context json.RawMessage `json:"context"`
RetryCount int `json:"retryCount"`
MaxRetries int `json:"maxRetries"`
Dependencies []string `json:"dependencies,omitempty"`
// contains filtered or unexported fields
}
type GenericRateLimiterConfig ¶
type GenericRateLimiterConfig struct {
RequestsPerSecond float64 `json:"requests_per_second"`
BurstSize int `json:"burst_size"`
Timeout time.Duration `json:"timeout"`
}
GenericRateLimiterConfig configures rate limiting for generic use cases
type HealthCheck ¶
type HealthChecker ¶
type HealthStatus ¶
type HealthStatus struct {
Status ClientStatus `json:"status"`
Latency time.Duration `json:"latency"`
LastChecked time.Time `json:"last_checked"`
Errors []string `json:"errors,omitempty"`
Details json.RawMessage `json:"details,omitempty"`
}
HealthStatus provides detailed health information
type IOOptimizer ¶
type IOOptimizer struct {
// contains filtered or unexported fields
}
func NewIOOptimizer ¶
type IntegrationConfig ¶
type IntegrationConfig struct {
MetricsAddr string `json:"metricsAddr"`
ProbeAddr string `json:"probeAddr"`
PprofAddr string `json:"pprofAddr"`
EnableLeaderElection bool `json:"enableLeaderElection"`
LeaderElectionID string `json:"leaderElectionID"`
StateManager *StateManagerConfig `json:"stateManager,omitempty"`
EventBus *EventBusConfig `json:"eventBus,omitempty"`
Coordination *CoordinationConfig `json:"coordination,omitempty"`
Performance *PerformanceConfig `json:"performance,omitempty"`
Recovery *RecoveryConfig `json:"recovery,omitempty"`
HealthCheckInterval time.Duration `json:"healthCheckInterval"`
MetricsInterval time.Duration `json:"metricsInterval"`
EnableProfiling bool `json:"enableProfiling"`
WebhookPort int `json:"webhookPort"`
WebhookCertDir string `json:"webhookCertDir"`
EnableRBAC bool `json:"enableRBAC"`
SecureMetrics bool `json:"secureMetrics"`
}
func DefaultIntegrationConfig ¶
func DefaultIntegrationConfig() *IntegrationConfig
type IntegrationConfigValidator ¶
type IntegrationConfigValidator struct{}
func (*IntegrationConfigValidator) GetConfigType ¶
func (v *IntegrationConfigValidator) GetConfigType() string
func (*IntegrationConfigValidator) Validate ¶
func (v *IntegrationConfigValidator) Validate(config interface{}) error
type IntegrationManager ¶
type IntegrationManager struct {
// contains filtered or unexported fields
}
func NewIntegrationManager ¶
func NewIntegrationManager(mgr manager.Manager, config *IntegrationConfig) (*IntegrationManager, error)
func (*IntegrationManager) GetCoordinationManager ¶
func (im *IntegrationManager) GetCoordinationManager() *CoordinationManager
func (*IntegrationManager) GetEventBus ¶
func (im *IntegrationManager) GetEventBus() EventBus
func (*IntegrationManager) GetMetrics ¶
func (im *IntegrationManager) GetMetrics() map[string]interface{}
func (*IntegrationManager) GetPerformanceOptimizer ¶
func (im *IntegrationManager) GetPerformanceOptimizer() *PerformanceOptimizer
func (*IntegrationManager) GetRecoveryManager ¶
func (im *IntegrationManager) GetRecoveryManager() *RecoveryManager
func (*IntegrationManager) GetStateManager ¶
func (im *IntegrationManager) GetStateManager() *StateManager
func (*IntegrationManager) GetSystemHealth ¶
func (im *IntegrationManager) GetSystemHealth() *SystemHealth
func (*IntegrationManager) RegisterController ¶
func (im *IntegrationManager) RegisterController(controller ControllerInterface) error
func (*IntegrationManager) RegisterHealthChecker ¶
func (im *IntegrationManager) RegisterHealthChecker(checker HealthChecker)
func (*IntegrationManager) RegisterWebhook ¶
func (im *IntegrationManager) RegisterWebhook(name string, webhook WebhookInterface) error
func (*IntegrationManager) SetupWithManager ¶
func (im *IntegrationManager) SetupWithManager() error
type IntentDependency ¶
type IntentDependency struct {
Intent string `json:"intent"`
Phase interfaces.ProcessingPhase `json:"phase"`
Type string `json:"type"` // "blocking", "soft", "notification"
Timestamp time.Time `json:"timestamp"`
Condition string `json:"condition,omitempty"`
Timeout time.Duration `json:"timeout,omitempty"`
}
type IntentState ¶
type IntentState struct {
NamespacedName types.NamespacedName `json:"namespacedName"`
Version string `json:"version"`
CreationTime time.Time `json:"creationTime"`
LastModified time.Time `json:"lastModified"`
CurrentPhase interfaces.ProcessingPhase `json:"currentPhase"`
PhaseStartTime time.Time `json:"phaseStartTime"`
PhaseTransitions []PhaseTransition `json:"phaseTransitions"`
PhaseData map[interfaces.ProcessingPhase]interface{} `json:"phaseData"`
PhaseErrors map[interfaces.ProcessingPhase][]string `json:"phaseErrors"`
Conditions []StateCondition `json:"conditions"`
Dependencies []IntentDependency `json:"dependencies"`
DependentIntents []string `json:"dependentIntents"`
LastError string `json:"lastError,omitempty"`
LastErrorTime time.Time `json:"lastErrorTime,omitempty"`
RetryCount int `json:"retryCount"`
AllocatedResources []ResourceAllocation `json:"allocatedResources"`
ResourceLocks []ResourceLock `json:"resourceLocks"`
ProcessingDuration time.Duration `json:"processingDuration"`
PhaseMetrics map[interfaces.ProcessingPhase]PhaseMetrics `json:"phaseMetrics"`
Metadata json.RawMessage `json:"metadata"`
Tags []string `json:"tags"`
}
type LLMError ¶
type LLMError struct {
Code string `json:"code"`
Message string `json:"message"`
Type string `json:"type"`
}
LLMError represents an error from LLM service
type LLMRequest ¶
type LLMRequest struct {
Model string `json:"model"`
Messages []ChatMessage `json:"messages"`
MaxTokens int `json:"max_tokens,omitempty"`
Temperature float32 `json:"temperature,omitempty"`
Stream bool `json:"stream,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
}
LLMRequest represents a request to an LLM service
type LLMResponse ¶
type LLMResponse struct {
ID string `json:"id"`
Content string `json:"content"`
Model string `json:"model"`
Usage TokenUsage `json:"usage"`
Created time.Time `json:"created"`
Error *LLMError `json:"error,omitempty"`
}
LLMResponse represents a response from an LLM service
type LatencyTracker ¶
type LatencyTracker struct {
// contains filtered or unexported fields
}
func NewLatencyTracker ¶
func NewLatencyTracker(maxSamples int) *LatencyTracker
func (*LatencyTracker) GetP50 ¶
func (lt *LatencyTracker) GetP50() time.Duration
func (*LatencyTracker) GetP95 ¶
func (lt *LatencyTracker) GetP95() time.Duration
func (*LatencyTracker) GetP99 ¶
func (lt *LatencyTracker) GetP99() time.Duration
func (*LatencyTracker) RecordLatency ¶
func (lt *LatencyTracker) RecordLatency(latency time.Duration)
type Lock ¶
type Lock struct {
Key string `json:"key"`
Owner string `json:"owner"`
LockType string `json:"lockType"`
AcquiredAt time.Time `json:"acquiredAt"`
ExpiresAt time.Time `json:"expiresAt"`
Renewable bool `json:"renewable"`
Metadata map[string]string `json:"metadata,omitempty"`
// contains filtered or unexported fields
}
type LockManager ¶
type LockManager struct {
// contains filtered or unexported fields
}
func NewLockManager ¶
func NewLockManager(defaultTimeout, retryInterval time.Duration, maxRetries int) *LockManager
func (*LockManager) AcquireLock ¶
func (lm *LockManager) AcquireLock(ctx context.Context, key string) error
func (*LockManager) AcquireLockWithOptions ¶
func (lm *LockManager) AcquireLockWithOptions(ctx context.Context, key string, opts *LockOptions) error
func (*LockManager) ActiveLocks ¶
func (lm *LockManager) ActiveLocks() int
func (*LockManager) GetStats ¶
func (lm *LockManager) GetStats() *LockStats
func (*LockManager) IsLocked ¶
func (lm *LockManager) IsLocked(key string) bool
func (*LockManager) ListLocks ¶
func (lm *LockManager) ListLocks() []*Lock
func (*LockManager) LockWithContext ¶
func (*LockManager) ReleaseLock ¶
func (lm *LockManager) ReleaseLock(key string) error
func (*LockManager) RenewLock ¶
func (lm *LockManager) RenewLock(key string, duration time.Duration) error
func (*LockManager) Stop ¶
func (lm *LockManager) Stop()
func (*LockManager) TryLockWithTimeout ¶
type LockOptions ¶
type LockOptions struct {
Timeout time.Duration `json:"timeout,omitempty"`
LockType string `json:"lockType,omitempty"` // "exclusive", "shared"
Renewable bool `json:"renewable,omitempty"`
Owner string `json:"owner,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
RetryCount int `json:"retryCount,omitempty"`
RetryBackoff time.Duration `json:"retryBackoff,omitempty"`
}
func DefaultLockOptions ¶
func DefaultLockOptions() *LockOptions
type MainIntegration ¶
type MainIntegration struct{}
MainIntegration provides a stub for integration tests
func NewMainIntegration ¶
func NewMainIntegration() *MainIntegration
NewMainIntegration creates a new integration test instance
type MemoryManager ¶
type MemoryManager struct {
// contains filtered or unexported fields
}
func NewMemoryManager ¶
func NewMemoryManager(maxMemory int64, gcThreshold float64) *MemoryManager
type MetricError ¶
type MetricsCollector ¶
type MetricsCollector struct {
// contains filtered or unexported fields
}
type ModelCapabilities ¶
type ModelCapabilities struct {
SupportsStreaming bool `json:"supports_streaming"`
SupportsSystemPrompt bool `json:"supports_system_prompt"`
SupportsChatFormat bool `json:"supports_chat_format"`
SupportsChat bool `json:"supports_chat"`
SupportsFunction bool `json:"supports_function"`
MaxTokens int `json:"max_tokens"`
CostPerToken float64 `json:"cost_per_token"`
SupportedMimeTypes []string `json:"supported_mime_types"`
ModelVersion string `json:"model_version"`
Features json.RawMessage `json:"features"`
}
ModelCapabilities represents model capabilities
type PerformanceConfig ¶
type PerformanceConfig struct {
DefaultPoolSize int `json:"defaultPoolSize"`
MaxPoolSize int `json:"maxPoolSize"`
PoolIdleTimeout time.Duration `json:"poolIdleTimeout"`
PoolHealthCheckInterval time.Duration `json:"poolHealthCheckInterval"`
DefaultBatchSize int `json:"defaultBatchSize"`
MaxBatchSize int `json:"maxBatchSize"`
BatchTimeout time.Duration `json:"batchTimeout"`
EnableAdaptiveBatching bool `json:"enableAdaptiveBatching"`
MaxMemoryUsage int64 `json:"maxMemoryUsage"` // in bytes
GCThreshold float64 `json:"gcThreshold"` // memory usage percentage
MemoryCheckInterval time.Duration `json:"memoryCheckInterval"`
MaxCPUUsage float64 `json:"maxCPUUsage"` // percentage
CPUThrottleThreshold float64 `json:"cpuThrottleThreshold"`
CPUCheckInterval time.Duration `json:"cpuCheckInterval"`
MaxConcurrentIO int `json:"maxConcurrentIO"`
IOTimeoutDefault time.Duration `json:"ioTimeoutDefault"`
EnableIOBuffering bool `json:"enableIOBuffering"`
IOBufferSize int `json:"ioBufferSize"`
CacheHitRateThreshold float64 `json:"cacheHitRateThreshold"`
CacheEvictionStrategy string `json:"cacheEvictionStrategy"`
CacheSizeThreshold int64 `json:"cacheSizeThreshold"`
MonitoringInterval time.Duration `json:"monitoringInterval"`
MetricsRetentionDays int `json:"metricsRetentionDays"`
EnableProfiling bool `json:"enableProfiling"`
}
func DefaultPerformanceConfig ¶
func DefaultPerformanceConfig() *PerformanceConfig
type PerformanceMetric ¶
type PerformanceMonitor ¶
type PerformanceMonitor struct {
// contains filtered or unexported fields
}
func NewPerformanceMonitor ¶
func NewPerformanceMonitor(interval time.Duration, retentionDays int, profiling bool, ) *PerformanceMonitor
func (*PerformanceMonitor) CollectMetrics ¶
func (pm *PerformanceMonitor) CollectMetrics(ctx context.Context)
type PerformanceOptimizer ¶
type PerformanceOptimizer struct {
// contains filtered or unexported fields
}
func NewPerformanceOptimizer ¶
func NewPerformanceOptimizer(config *PerformanceConfig) *PerformanceOptimizer
func (*PerformanceOptimizer) CreateBatchProcessor ¶
func (po *PerformanceOptimizer) CreateBatchProcessor(name string, batchSize int, processor func([]interface{}) error, ) *BatchProcessor
func (*PerformanceOptimizer) CreateConnectionPool ¶
func (po *PerformanceOptimizer) CreateConnectionPool(name string, factory func() (Connection, error), maxSize int) *ConnectionPool
func (*PerformanceOptimizer) GetBatchProcessor ¶
func (po *PerformanceOptimizer) GetBatchProcessor(name string) *BatchProcessor
func (*PerformanceOptimizer) GetConnectionPool ¶
func (po *PerformanceOptimizer) GetConnectionPool(name string) *ConnectionPool
func (*PerformanceOptimizer) OptimizeCPUUsage ¶
func (po *PerformanceOptimizer) OptimizeCPUUsage(ctx context.Context) error
func (*PerformanceOptimizer) OptimizeCachePerformance ¶
func (po *PerformanceOptimizer) OptimizeCachePerformance(ctx context.Context) error
func (*PerformanceOptimizer) OptimizeIOPerformance ¶
func (po *PerformanceOptimizer) OptimizeIOPerformance(ctx context.Context) error
func (*PerformanceOptimizer) OptimizeMemoryUsage ¶
func (po *PerformanceOptimizer) OptimizeMemoryUsage(ctx context.Context) error
type PerformanceOptimizerAdapter ¶
type PerformanceOptimizerAdapter struct {
*PerformanceOptimizer
}
func (*PerformanceOptimizerAdapter) GetName ¶
func (poa *PerformanceOptimizerAdapter) GetName() string
func (*PerformanceOptimizerAdapter) IsHealthy ¶
func (poa *PerformanceOptimizerAdapter) IsHealthy() bool
type PhaseExecutor ¶
type PhaseExecutor interface {
Execute(ctx context.Context, intent types.NamespacedName, phase interfaces.ProcessingPhase, data interface{}) error
Validate(phase interfaces.ProcessingPhase, data interface{}) error
GetEstimatedDuration(phase interfaces.ProcessingPhase) time.Duration
CanExecuteParallel() bool
}
type PhaseMetrics ¶
type PhaseMetrics struct {
StartTime time.Time `json:"startTime"`
EndTime time.Time `json:"endTime"`
Duration time.Duration `json:"duration"`
AttemptsCount int `json:"attemptsCount"`
SuccessCount int `json:"successCount"`
ErrorCount int `json:"errorCount"`
ResourcesUsed []string `json:"resourcesUsed"`
ProcessedItems int `json:"processedItems"`
ThroughputRate float64 `json:"throughputRate"`
MemoryUsageMB float64 `json:"memoryUsageMB"`
CPUUsagePercent float64 `json:"cpuUsagePercent"`
}
type PhaseTransition ¶
type PhaseTransition struct {
FromPhase interfaces.ProcessingPhase `json:"fromPhase"`
ToPhase interfaces.ProcessingPhase `json:"toPhase"`
Timestamp time.Time `json:"timestamp"`
Duration time.Duration `json:"duration"`
TriggerReason string `json:"triggerReason,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
Success bool `json:"success"`
ErrorMessage string `json:"errorMessage,omitempty"`
}
type ProcessingEvent ¶
type ProcessingEvent struct {
Type string `json:"type"`
Source string `json:"source"`
IntentID string `json:"intentId"`
Phase string `json:"phase"`
Success bool `json:"success"`
Data json.RawMessage `json:"data"`
Timestamp int64 `json:"timestamp"` // Unix timestamp
CorrelationID string `json:"correlationId"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type QueryRequest ¶
type QueryRequest struct {
Query string `json:"query"`
Filters json.RawMessage `json:"filters,omitempty"`
Limit int `json:"limit,omitempty"`
Threshold float32 `json:"threshold,omitempty"`
UserID string `json:"user_id,omitempty"`
SessionID string `json:"session_id,omitempty"`
}
QueryRequest represents a request for query processing
type QueueStats ¶
type QueueStats struct {
PendingTasks int64 `json:"pendingTasks"`
ActiveTasks int64 `json:"activeTasks"`
CompletedTasks int64 `json:"completedTasks"`
EnqueuedCount int64 `json:"enqueuedCount"`
DequeuedCount int64 `json:"dequeuedCount"`
DroppedCount int64 `json:"droppedCount"`
Capacity int64 `json:"capacity"`
MaxPendingTasks int64 `json:"maxPendingTasks"`
}
type RAGError ¶
type RAGError struct {
Code string `json:"code"`
Message string `json:"message"`
Type string `json:"type"`
}
RAGError represents an error from RAG system
type RAGResponse ¶
type RAGResponse struct {
Query string `json:"query"`
Results []SearchResult `json:"results"`
Context string `json:"context"`
Documents []TelecomDocument `json:"documents"`
TotalTime time.Duration `json:"total_time"`
Took time.Duration `json:"took"` // Time taken for the search
Confidence float64 `json:"confidence"`
Error *RAGError `json:"error,omitempty"`
ProcessedAt time.Time `json:"processed_at,omitempty"` // When the response was processed
Metadata json.RawMessage `json:"metadata,omitempty"` // Additional metadata
}
RAGResponse represents the response from RAG system
type RAGServiceInterface ¶
type RAGServiceInterface interface {
Search(ctx context.Context, query *SearchQuery) (*RAGResponse, error)
IndexDocument(ctx context.Context, document *TelecomDocument) error
DeleteDocument(ctx context.Context, documentID string) error
GetDocument(ctx context.Context, documentID string) (*TelecomDocument, error)
HealthCheck(ctx context.Context) error
Close() error
}
RAGServiceInterface defines the interface for RAG service
type RecoveryAction ¶
type RecoveryAttempt ¶
type RecoveryAttempt struct {
ID string `json:"id"`
IntentName types.NamespacedName `json:"intentName"`
Phase interfaces.ProcessingPhase `json:"phase"`
Strategy *RecoveryStrategy `json:"strategy"`
StartTime time.Time `json:"startTime"`
EndTime time.Time `json:"endTime"`
AttemptNumber int `json:"attemptNumber"`
Status string `json:"status"` // "running", "success", "failed", "timeout"
Error string `json:"error,omitempty"`
RecoveryActions []RecoveryAction `json:"recoveryActions"`
StateBeforeRecovery *IntentState `json:"stateBeforeRecovery,omitempty"`
StateAfterRecovery *IntentState `json:"stateAfterRecovery,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
}
type RecoveryCondition ¶
type RecoveryCondition struct {
Type string `json:"type"` // "state_field", "resource_exists", "time_threshold", "custom"
Field string `json:"field,omitempty"`
Operator string `json:"operator"` // "equals", "not_equals", "greater_than", "less_than", "exists", "not_exists"
Value interface{} `json:"value,omitempty"`
Description string `json:"description,omitempty"`
}
type RecoveryConfig ¶
type RecoveryConfig struct {
RecoveryInterval time.Duration `json:"recoveryInterval"`
StateCheckInterval time.Duration `json:"stateCheckInterval"`
MaxRecoveryAttempts int `json:"maxRecoveryAttempts"`
RecoveryTimeout time.Duration `json:"recoveryTimeout"`
MaxConcurrentRecoveries int `json:"maxConcurrentRecoveries"`
DefaultStrategy string `json:"defaultStrategy"` // "restart", "rollback", "skip", "manual"
EnableAutoRecovery bool `json:"enableAutoRecovery"`
EnablePreemptiveRecovery bool `json:"enablePreemptiveRecovery"`
EnableStateValidation bool `json:"enableStateValidation"`
StateCorruptionAction string `json:"stateCorruptionAction"` // "restore", "recreate", "alert"
BackupRetentionDays int `json:"backupRetentionDays"`
}
func DefaultRecoveryConfig ¶
func DefaultRecoveryConfig() *RecoveryConfig
type RecoveryHandler ¶
type RecoveryHandler func(ctx context.Context, attempt *RecoveryAttempt) error
type RecoveryManager ¶
type RecoveryManager struct {
// contains filtered or unexported fields
}
func NewRecoveryManager ¶
func NewRecoveryManager(stateManager *StateManager, eventBus EventBus) *RecoveryManager
func (*RecoveryManager) GetRecoveryHistory ¶
func (rm *RecoveryManager) GetRecoveryHistory(intentName types.NamespacedName) []*RecoveryAttempt
func (*RecoveryManager) GetRecoveryStats ¶
func (rm *RecoveryManager) GetRecoveryStats() *RecoveryStats
func (*RecoveryManager) RecoverIntent ¶
func (rm *RecoveryManager) RecoverIntent(ctx context.Context, intentName types.NamespacedName, phase interfaces.ProcessingPhase, reason string) error
func (*RecoveryManager) RegisterRecoveryStrategy ¶
func (rm *RecoveryManager) RegisterRecoveryStrategy(phase interfaces.ProcessingPhase, strategy *RecoveryStrategy)
type RecoveryManagerAdapter ¶
type RecoveryManagerAdapter struct {
*RecoveryManager
}
func (*RecoveryManagerAdapter) GetName ¶
func (rma *RecoveryManagerAdapter) GetName() string
func (*RecoveryManagerAdapter) IsHealthy ¶
func (rma *RecoveryManagerAdapter) IsHealthy() bool
type RecoveryStats ¶
type RecoveryStats struct {
TotalAttempts int `json:"totalAttempts"`
SuccessfulAttempts int `json:"successfulAttempts"`
FailedAttempts int `json:"failedAttempts"`
RunningAttempts int `json:"runningAttempts"`
AttemptsByPhase map[string]int `json:"attemptsByPhase"`
AttemptsByStrategy map[string]int `json:"attemptsByStrategy"`
}
type RecoveryStrategy ¶
type RecoveryStrategy struct {
Type string `json:"type"` // "restart", "rollback", "skip", "manual", "custom"
MaxAttempts int `json:"maxAttempts"`
BackoffMultiplier float64 `json:"backoffMultiplier"`
InitialBackoff time.Duration `json:"initialBackoff"`
MaxBackoff time.Duration `json:"maxBackoff"`
PreConditions []RecoveryCondition `json:"preConditions,omitempty"`
PostConditions []RecoveryCondition `json:"postConditions,omitempty"`
CustomHandler RecoveryHandler `json:"-"` // Function for custom recovery
NotificationTargets []string `json:"notificationTargets,omitempty"`
}
type RequestOption ¶
type RequestOption func(*RequestOptions)
RequestOption represents functional options for requests (Go 1.24 pattern)
func WithHeaders ¶
func WithHeaders(headers map[string]string) RequestOption
func WithRateLimiter ¶
func WithRateLimiter(config GenericRateLimiterConfig) RequestOption
func WithRetryPolicy ¶
func WithRetryPolicy(policy *RetryPolicy) RequestOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) RequestOption
Functional option constructors
type RequestOptions ¶
type RequestOptions struct {
Timeout time.Duration `json:"timeout,omitempty"`
RetryPolicy *RetryPolicy `json:"retry_policy,omitempty"`
RateLimiter GenericRateLimiterConfig `json:"rate_limiter,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
}
RequestOptions provides optional configuration for requests
func ApplyRequestOptions ¶
func ApplyRequestOptions(base *RequestOptions, opts ...RequestOption) *RequestOptions
Helper function to apply request options
type ResourceAllocation ¶
type ResourceAllocation struct {
ResourceType string `json:"resourceType"`
ResourceID string `json:"resourceId"`
Quantity string `json:"quantity"`
Status string `json:"status"` // "allocated", "released", "pending"
AllocatedAt time.Time `json:"allocatedAt"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type ResourceLock ¶
type ResourceLock struct {
LockID string `json:"lockId"`
ResourceType string `json:"resourceType"`
ResourceID string `json:"resourceId"`
LockType string `json:"lockType"` // "exclusive", "shared"
AcquiredAt time.Time `json:"acquiredAt"`
ExpiresAt time.Time `json:"expiresAt"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type ResourceUsage ¶
type Result ¶
Result represents a generic result with error handling (Go 1.24 pattern)
type RetryPolicy ¶
type RetryPolicy struct {
MaxRetries int `json:"maxRetries"`
BackoffBase time.Duration `json:"backoffBase"`
BackoffMax time.Duration `json:"backoffMax"`
BackoffJitter bool `json:"backoffJitter"`
RetryableErrors []string `json:"retryableErrors,omitempty"`
}
func (*RetryPolicy) Execute ¶
func (rp *RetryPolicy) Execute(fn func() error) error
type SearchQuery ¶
type SearchQuery struct {
Query string `json:"query"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
Threshold float32 `json:"threshold,omitempty"`
Filters json.RawMessage `json:"filters,omitempty"`
ContextID string `json:"context_id,omitempty"`
UserID string `json:"user_id,omitempty"`
Namespace string `json:"namespace,omitempty"`
HybridSearch bool `json:"hybrid_search,omitempty"`
HybridAlpha float32 `json:"hybrid_alpha,omitempty"`
UseReranker bool `json:"use_reranker,omitempty"`
MinConfidence float32 `json:"min_confidence,omitempty"`
IncludeVector bool `json:"include_vector,omitempty"`
ExpandQuery bool `json:"expand_query,omitempty"`
TargetVectors []string `json:"target_vectors,omitempty"`
}
SearchQuery represents a query to the RAG system
type SearchResponse ¶
type SearchResponse struct {
Results []*SearchResult `json:"results"`
Took int64 `json:"took"`
Total int64 `json:"total"`
}
type SearchResult ¶
type SearchResult struct {
ID string `json:"id"`
Content string `json:"content"`
Metadata json.RawMessage `json:"metadata"`
Score float32 `json:"score"`
Distance float32 `json:"distance"` // Added for test compatibility
Source string `json:"source"`
Chunk int `json:"chunk"`
Title string `json:"title"`
Summary string `json:"summary"`
Document *TelecomDocument `json:"document"` // Added for test compatibility
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Confidence float32 `json:"confidence"` // Added for test compatibility
}
SearchResult represents a single search result from RAG
type SimpleEventFilter ¶
func (*SimpleEventFilter) ShouldProcess ¶
func (f *SimpleEventFilter) ShouldProcess(event ProcessingEvent) bool
type StartableComponent ¶
type StateCache ¶
type StateCache struct {
// contains filtered or unexported fields
}
func NewStateCache ¶
func NewStateCache(maxSize int, defaultTTL time.Duration) *StateCache
func (*StateCache) Cleanup ¶
func (c *StateCache) Cleanup() int
func (*StateCache) Clear ¶
func (c *StateCache) Clear()
func (*StateCache) Contains ¶
func (c *StateCache) Contains(key string) bool
func (*StateCache) Delete ¶
func (c *StateCache) Delete(key string) bool
func (*StateCache) Get ¶
func (c *StateCache) Get(key string) interface{}
func (*StateCache) GetMostRecent ¶
func (c *StateCache) GetMostRecent() (string, interface{}, bool)
func (*StateCache) GetMultiple ¶
func (c *StateCache) GetMultiple(keys []string) map[string]interface{}
func (*StateCache) GetOldest ¶
func (c *StateCache) GetOldest() (string, interface{}, bool)
func (*StateCache) GetWithStats ¶
func (c *StateCache) GetWithStats(key string) (interface{}, *CacheEntryStats)
func (*StateCache) Keys ¶
func (c *StateCache) Keys() []string
func (*StateCache) SetMultiple ¶
func (c *StateCache) SetMultiple(entries map[string]interface{}, ttl time.Duration)
func (*StateCache) SetWithCallback ¶
func (c *StateCache) SetWithCallback(key string, value interface{}, ttl time.Duration, callback func(string, interface{}))
func (*StateCache) Size ¶
func (c *StateCache) Size() int
func (*StateCache) Stats ¶
func (c *StateCache) Stats() *CacheStats
func (*StateCache) Stop ¶
func (c *StateCache) Stop()
type StateChangeEvent ¶
type StateChangeEvent struct {
Type string `json:"type"`
IntentName types.NamespacedName `json:"intentName"`
OldPhase interfaces.ProcessingPhase `json:"oldPhase,omitempty"`
NewPhase interfaces.ProcessingPhase `json:"newPhase"`
Version string `json:"version"`
Timestamp time.Time `json:"timestamp"`
ChangeReason string `json:"changeReason,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
AffectedFields []string `json:"affectedFields,omitempty"`
}
type StateCondition ¶
type StateConflict ¶
type StateConflict struct {
IntentName types.NamespacedName `json:"intentName"`
ConflictType string `json:"conflictType"`
Field string `json:"field"`
CachedValue interface{} `json:"cachedValue"`
KubernetesValue interface{} `json:"kubernetesValue"`
LastModified time.Time `json:"lastModified"`
Severity string `json:"severity"` // "low", "medium", "high", "critical"
Resolution string `json:"resolution,omitempty"`
}
type StateManager ¶
type StateManager struct {
// contains filtered or unexported fields
}
func NewStateManager ¶
func NewStateManager(client client.Client, recorder record.EventRecorder, logger logr.Logger, scheme *runtime.Scheme, eventBus EventBus) *StateManager
func (*StateManager) AddDependency ¶
func (sm *StateManager) AddDependency(ctx context.Context, intentName, dependsOnIntent types.NamespacedName) error
func (*StateManager) CheckDependencies ¶
func (sm *StateManager) CheckDependencies(ctx context.Context, namespacedName types.NamespacedName) (bool, []string, error)
func (*StateManager) GetIntentState ¶
func (sm *StateManager) GetIntentState(ctx context.Context, namespacedName types.NamespacedName) (*IntentState, error)
func (*StateManager) GetPhaseData ¶
func (sm *StateManager) GetPhaseData(ctx context.Context, namespacedName types.NamespacedName, phase interfaces.ProcessingPhase) (interface{}, error)
func (*StateManager) GetStatistics ¶
func (sm *StateManager) GetStatistics() *StateStatistics
func (*StateManager) ListStates ¶
func (sm *StateManager) ListStates(ctx context.Context, namespace string, labelSelector map[string]string) ([]*IntentState, error)
func (*StateManager) SetPhaseData ¶
func (sm *StateManager) SetPhaseData(ctx context.Context, namespacedName types.NamespacedName, phase interfaces.ProcessingPhase, data interface{}) error
func (*StateManager) SetPhaseError ¶
func (sm *StateManager) SetPhaseError(ctx context.Context, namespacedName types.NamespacedName, phase interfaces.ProcessingPhase, err error) error
func (*StateManager) TransitionPhase ¶
func (sm *StateManager) TransitionPhase(ctx context.Context, namespacedName types.NamespacedName, newPhase interfaces.ProcessingPhase, metadata map[string]interface{}) error
func (*StateManager) UpdateIntentState ¶
func (sm *StateManager) UpdateIntentState(ctx context.Context, namespacedName types.NamespacedName, updateFn func(*IntentState) error) error
type StateManagerAdapter ¶
type StateManagerAdapter struct {
*StateManager
}
func (*StateManagerAdapter) GetName ¶
func (sma *StateManagerAdapter) GetName() string
func (*StateManagerAdapter) IsHealthy ¶
func (sma *StateManagerAdapter) IsHealthy() bool
type StateManagerConfig ¶
type StateManagerConfig struct {
CacheSize int `json:"cacheSize"`
CacheTTL time.Duration `json:"cacheTTL"`
CacheCleanupInterval time.Duration `json:"cacheCleanupInterval"`
LockTimeout time.Duration `json:"lockTimeout"`
LockRetryInterval time.Duration `json:"lockRetryInterval"`
MaxLockRetries int `json:"maxLockRetries"`
SyncInterval time.Duration `json:"syncInterval"`
StateValidationEnabled bool `json:"stateValidationEnabled"`
ConflictResolutionMode string `json:"conflictResolutionMode"` // "latest", "merge", "manual"
BatchStateUpdates bool `json:"batchStateUpdates"`
BatchSize int `json:"batchSize"`
BatchTimeout time.Duration `json:"batchTimeout"`
}
func DefaultStateManagerConfig ¶
func DefaultStateManagerConfig() *StateManagerConfig
type StateManagerConfigValidator ¶
type StateManagerConfigValidator struct{}
func (*StateManagerConfigValidator) GetConfigType ¶
func (v *StateManagerConfigValidator) GetConfigType() string
func (*StateManagerConfigValidator) Validate ¶
func (v *StateManagerConfigValidator) Validate(config interface{}) error
type StateMetrics ¶
type StateMetrics struct {
// contains filtered or unexported fields
}
func NewStateMetrics ¶
func NewStateMetrics() *StateMetrics
func (*StateMetrics) GetAverageUpdateTime ¶
func (sm *StateMetrics) GetAverageUpdateTime() time.Duration
func (*StateMetrics) GetCacheHitRate ¶
func (sm *StateMetrics) GetCacheHitRate() float64
func (*StateMetrics) GetLastSyncTime ¶
func (sm *StateMetrics) GetLastSyncTime() time.Time
func (*StateMetrics) GetMetrics ¶
func (sm *StateMetrics) GetMetrics() *StateMetricsSnapshot
func (*StateMetrics) GetRecentErrors ¶
func (sm *StateMetrics) GetRecentErrors(count int) []MetricError
func (*StateMetrics) GetValidationErrors ¶
func (sm *StateMetrics) GetValidationErrors() int64
func (*StateMetrics) RecordActiveLocks ¶
func (sm *StateMetrics) RecordActiveLocks(count int)
func (*StateMetrics) RecordCPUUsage ¶
func (sm *StateMetrics) RecordCPUUsage(percent float64)
func (*StateMetrics) RecordCacheCleanup ¶
func (sm *StateMetrics) RecordCacheCleanup()
func (*StateMetrics) RecordCacheHit ¶
func (sm *StateMetrics) RecordCacheHit()
func (*StateMetrics) RecordCacheMiss ¶
func (sm *StateMetrics) RecordCacheMiss()
func (*StateMetrics) RecordCacheSize ¶
func (sm *StateMetrics) RecordCacheSize(size int64)
func (*StateMetrics) RecordConflictResolution ¶
func (sm *StateMetrics) RecordConflictResolution()
func (*StateMetrics) RecordDiskUsage ¶
func (sm *StateMetrics) RecordDiskUsage(bytes int64)
func (*StateMetrics) RecordError ¶
func (sm *StateMetrics) RecordError(operation, errorMsg, context, severity string)
func (*StateMetrics) RecordLockAcquisition ¶
func (sm *StateMetrics) RecordLockAcquisition()
func (*StateMetrics) RecordLockRelease ¶
func (sm *StateMetrics) RecordLockRelease()
func (*StateMetrics) RecordLockTimeout ¶
func (sm *StateMetrics) RecordLockTimeout()
func (*StateMetrics) RecordMemoryUsage ¶
func (sm *StateMetrics) RecordMemoryUsage(bytes int64)
func (*StateMetrics) RecordStateSync ¶
func (sm *StateMetrics) RecordStateSync()
func (*StateMetrics) RecordStateSyncTime ¶
func (sm *StateMetrics) RecordStateSyncTime(duration time.Duration)
func (*StateMetrics) RecordStateUpdate ¶
func (sm *StateMetrics) RecordStateUpdate()
func (*StateMetrics) RecordStateUpdateTime ¶
func (sm *StateMetrics) RecordStateUpdateTime(duration time.Duration)
func (*StateMetrics) RecordValidationError ¶
func (sm *StateMetrics) RecordValidationError()
type StateMetricsSnapshot ¶
type StateMetricsSnapshot struct {
Timestamp time.Time `json:"timestamp"`
CacheHits int64 `json:"cacheHits"`
CacheMisses int64 `json:"cacheMisses"`
CacheHitRate float64 `json:"cacheHitRate"`
CacheSize int64 `json:"cacheSize"`
CacheCleanups int64 `json:"cacheCleanups"`
StateUpdates int64 `json:"stateUpdates"`
StateSyncs int64 `json:"stateSyncs"`
ValidationErrors int64 `json:"validationErrors"`
ConflictResolutions int64 `json:"conflictResolutions"`
ActiveLocks int64 `json:"activeLocks"`
LockAcquisitions int64 `json:"lockAcquisitions"`
LockReleases int64 `json:"lockReleases"`
LockTimeouts int64 `json:"lockTimeouts"`
AverageUpdateTime time.Duration `json:"averageUpdateTime"`
LastSyncTime time.Time `json:"lastSyncTime"`
Throughput float64 `json:"throughput"` // Operations per second
LatencyP50 time.Duration `json:"latencyP50"`
LatencyP95 time.Duration `json:"latencyP95"`
LatencyP99 time.Duration `json:"latencyP99"`
MemoryUsage int64 `json:"memoryUsage"`
CPUUsage float64 `json:"cpuUsage"`
DiskUsage int64 `json:"diskUsage"`
RecentErrorCount int64 `json:"recentErrorCount"`
}
type StateMutex ¶
type StateQuery ¶
type StateQuery struct {
Namespace string `json:"namespace,omitempty"`
Name string `json:"name,omitempty"`
Phase interfaces.ProcessingPhase `json:"phase,omitempty"`
Phases []interfaces.ProcessingPhase `json:"phases,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Tags []string `json:"tags,omitempty"`
CreatedAfter *time.Time `json:"createdAfter,omitempty"`
CreatedBefore *time.Time `json:"createdBefore,omitempty"`
ModifiedAfter *time.Time `json:"modifiedAfter,omitempty"`
ModifiedBefore *time.Time `json:"modifiedBefore,omitempty"`
HasErrors *bool `json:"hasErrors,omitempty"`
HasDependencies *bool `json:"hasDependencies,omitempty"`
OrderBy string `json:"orderBy,omitempty"` // "name", "created", "modified", "phase"
Order string `json:"order,omitempty"` // "asc", "desc"
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
}
type StateQueryResult ¶
type StateRecoveryInfo ¶
type StateRecoveryInfo struct {
IntentName types.NamespacedName `json:"intentName"`
LastKnownGoodVersion string `json:"lastKnownGoodVersion"`
CorruptedVersion string `json:"corruptedVersion"`
RecoveryStrategy string `json:"recoveryStrategy"`
RecoveryTime time.Time `json:"recoveryTime"`
DataLoss bool `json:"dataLoss"`
RecoveredFields []string `json:"recoveredFields"`
Notes string `json:"notes,omitempty"`
}
type StateSnapshot ¶
type StateSnapshot struct {
IntentName types.NamespacedName `json:"intentName"`
Version string `json:"version"`
SnapshotTime time.Time `json:"snapshotTime"`
State *IntentState `json:"state"`
Checksum string `json:"checksum"`
CompressedSize int64 `json:"compressedSize"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type StateStatistics ¶
type StateStatistics struct {
TotalStates int `json:"totalStates"`
StatesByPhase map[string]int `json:"statesByPhase"`
CacheHitRate float64 `json:"cacheHitRate"`
ActiveLocks int `json:"activeLocks"`
AverageUpdateTime time.Duration `json:"averageUpdateTime"`
StateValidationErrors int64 `json:"stateValidationErrors"`
LastSyncTime time.Time `json:"lastSyncTime"`
ConflictResolutions int64 `json:"conflictResolutions"`
DependencyViolations int64 `json:"dependencyViolations"`
}
type StateSyncRequest ¶
type StateSyncRequest struct {
IntentName types.NamespacedName `json:"intentName"`
RequestedBy string `json:"requestedBy"`
SyncType string `json:"syncType"` // "full", "incremental", "validate"
ForceSync bool `json:"forceSync"`
Timestamp time.Time `json:"timestamp"`
TargetVersion string `json:"targetVersion,omitempty"`
}
type StateSyncResponse ¶
type StateSyncResponse struct {
RequestID string `json:"requestId"`
Success bool `json:"success"`
ConflictsFound int `json:"conflictsFound"`
ConflictsResolved int `json:"conflictsResolved"`
UpdatesApplied int `json:"updatesApplied"`
ErrorMessage string `json:"errorMessage,omitempty"`
ProcessingTime time.Duration `json:"processingTime"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type StateValidationError ¶
type StateValidationResult ¶
type StateValidationResult struct {
Valid bool `json:"valid"`
Errors []StateValidationError `json:"errors,omitempty"`
Warnings []StateValidationWarning `json:"warnings,omitempty"`
ValidationTime time.Duration `json:"validationTime"`
ValidatedFields int `json:"validatedFields"`
Version string `json:"version"`
}
type StateValidationWarning ¶
type StateValidationWarning struct {
Field string `json:"field"`
Value interface{} `json:"value"`
Message string `json:"message"`
Suggestion string `json:"suggestion,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
}
type StreamingChunk ¶
type StreamingChunk struct {
ID string `json:"id"`
Content string `json:"content"`
Delta string `json:"delta"`
Done bool `json:"done"`
IsLast bool `json:"is_last"`
Timestamp time.Time `json:"timestamp"`
Metadata json.RawMessage `json:"metadata,omitempty"`
Error *LLMError `json:"error,omitempty"`
}
StreamingChunk represents a chunk of streamed response
type SystemHealth ¶
type SystemHealth struct {
OverallStatus string `json:"overallStatus"`
Healthy bool `json:"healthy"`
Components map[string]*ComponentStatus `json:"components"`
LastUpdate time.Time `json:"lastUpdate"`
ActiveIntents int `json:"activeIntents"`
ProcessingRate float64 `json:"processingRate"`
ErrorRate float64 `json:"errorRate"`
ResourceUsage ResourceUsage `json:"resourceUsage"`
}
type TaskFilter ¶
type TaskFilter struct {
IntentNamespace string `json:"intentNamespace,omitempty"`
IntentName string `json:"intentName,omitempty"`
Phase interfaces.ProcessingPhase `json:"phase,omitempty"`
MinPriority *int `json:"minPriority,omitempty"`
MaxPriority *int `json:"maxPriority,omitempty"`
CreatedAfter *time.Time `json:"createdAfter,omitempty"`
CreatedBefore *time.Time `json:"createdBefore,omitempty"`
}
type TaskHeap ¶
type TaskHeap []*ExecutionTask
type TelecomDocument ¶
type TelecomDocument struct {
ID string `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Type DocumentType `json:"type"`
DocumentType string `json:"document_type"` // String representation of type
Category string `json:"category"`
Standard string `json:"standard"` // e.g., "3GPP TS 38.401"
Version string `json:"version"` // e.g., "16.0.0"
Section string `json:"section"` // e.g., "7.2.1"
Keywords []string `json:"keywords"`
Source string `json:"source"` // Added for test compatibility
NetworkFunction []string `json:"network_function"` // Added for test compatibility
Technology []string `json:"technology"` // Added for test compatibility
Confidence float64 `json:"confidence"` // Added for test compatibility
Score float64 `json:"score"` // Added for test compatibility
UseCase string `json:"use_case"` // For compatibility
Timestamp time.Time `json:"timestamp"` // For compatibility
Metadata json.RawMessage `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Indexed bool `json:"indexed"`
}
TelecomDocument represents a telecom-specific document
type ThroughputTracker ¶
type ThroughputTracker struct {
// contains filtered or unexported fields
}
func NewThroughputTracker ¶
func NewThroughputTracker(windowSize time.Duration) *ThroughputTracker
func (*ThroughputTracker) GetCurrentThroughput ¶
func (tt *ThroughputTracker) GetCurrentThroughput() float64
func (*ThroughputTracker) RecordOperation ¶
func (tt *ThroughputTracker) RecordOperation()
type TokenUsage ¶
type TokenUsage struct {
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
}
TokenUsage represents token usage information
type VectorStoreInterface ¶
type VectorStoreInterface interface {
Store(ctx context.Context, id string, vector []float32, metadata map[string]interface{}) error
Search(ctx context.Context, vector []float32, limit int, threshold float32) ([]SearchResult, error)
Delete(ctx context.Context, id string) error
Get(ctx context.Context, id string) (*SearchResult, error)
HealthCheck(ctx context.Context) error
Close() error
}
VectorStoreInterface defines the interface for vector storage
Source Files
¶
- client_interfaces.go
- configuration_manager.go
- coordination_manager.go
- enhanced_event_bus.go
- event_bus_interface.go
- event_components.go
- execution_queue.go
- go124_patterns.go
- integration_manager.go
- lock_manager.go
- main_integration.go
- math_utils.go
- performance_optimizer.go
- phase_conversion.go
- rag_types.go
- recovery_manager.go
- state_cache.go
- state_manager.go
- state_metrics.go
- state_types.go
- types.go