Documentation
¶
Index ¶
- Constants
- type BatchSearchConfig
- type BatchSearchRequest
- type BatchSearchResponse
- type ChatMessage
- type CircuitBreakerConfig
- type ComponentStatus
- type ComponentType
- type EmbeddingCacheEntry
- type EmbeddingCacheInterface
- type EmbeddingCacheStats
- type HealthStatus
- type LLMConfig
- type LLMRequest
- type LLMResponse
- type NetworkIntent
- type PoolConfig
- type PoolMetrics
- type ResourceUsage
- type ScalingIntent
- type SearchQuery
- type SearchResponse
- type SearchResult
- type ServiceConfig
- type SystemHealth
- type TokenUsage
Constants ¶
const ( ComponentTypeLLMProcessor = contracts.ComponentTypeLLMProcessor ComponentTypeResourcePlanner = contracts.ComponentTypeResourcePlanner ComponentTypeManifestGenerator = contracts.ComponentTypeManifestGenerator ComponentTypeGitOpsController = contracts.ComponentTypeGitOpsController ComponentTypeDeploymentVerifier = contracts.ComponentTypeDeploymentVerifier )
Constants for backward compatibility
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchSearchConfig ¶
type BatchSearchConfig struct {
MaxBatchSize int `json:"max_batch_size"`
MaxWaitTime time.Duration `json:"max_wait_time"`
EnableDeduplication bool `json:"enable_deduplication"`
MaxConcurrency int `json:"max_concurrency"`
CacheEnabled bool `json:"cache_enabled"`
CacheTTL time.Duration `json:"cache_ttl"`
}
BatchSearchConfig holds configuration for batch search operations
type BatchSearchRequest ¶
type BatchSearchRequest struct {
Queries []*SearchQuery `json:"queries"`
MaxConcurrency int `json:"max_concurrency"`
EnableAggregation bool `json:"enable_aggregation"`
DeduplicationKey string `json:"deduplication_key"`
Metadata json.RawMessage `json:"metadata"`
}
BatchSearchRequest represents a batch of search requests
type BatchSearchResponse ¶
type BatchSearchResponse struct {
Results []*SearchResponse `json:"results"`
AggregatedResults []*SearchResult `json:"aggregated_results"`
TotalProcessingTime time.Duration `json:"total_processing_time"`
ParallelQueries int `json:"parallel_queries"`
CacheHits int `json:"cache_hits"`
Metadata json.RawMessage `json:"metadata"`
}
BatchSearchResponse represents the response from batch search
type ChatMessage ¶
type ChatMessage struct {
Role string `json:"role"` // "system", "user", "assistant"
Content string `json:"content"`
}
ChatMessage represents a chat message
type CircuitBreakerConfig ¶
type CircuitBreakerConfig struct {
FailureThreshold int64 `json:"failure_threshold"`
FailureRate float64 `json:"failure_rate"`
MinimumRequestCount int64 `json:"minimum_request_count"`
Timeout time.Duration `json:"timeout"`
HalfOpenTimeout time.Duration `json:"half_open_timeout"`
SuccessThreshold int64 `json:"success_threshold"`
HalfOpenMaxRequests int64 `json:"half_open_max_requests"`
ResetTimeout time.Duration `json:"reset_timeout"`
SlidingWindowSize int `json:"sliding_window_size"`
EnableHealthCheck bool `json:"enable_health_check"`
HealthCheckInterval time.Duration `json:"health_check_interval"`
HealthCheckTimeout time.Duration `json:"health_check_timeout"`
// Advanced features
EnableAdaptiveTimeout bool `json:"enable_adaptive_timeout"`
MaxConcurrentRequests int `json:"max_concurrent_requests"`
}
CircuitBreakerConfig holds configuration for circuit breaker
type ComponentStatus ¶
type ComponentStatus = contracts.ComponentStatus
ComponentStatus is an alias to the contracts package for backward compatibility
type ComponentType ¶
type ComponentType = contracts.ComponentType
Type aliases for backward compatibility
type EmbeddingCacheEntry ¶
type EmbeddingCacheEntry struct {
Text string `json:"text"`
Vector []float32 `json:"vector"`
CreatedAt time.Time `json:"created_at"`
AccessCount int64 `json:"access_count"`
TTL time.Duration `json:"ttl"`
}
EmbeddingCacheEntry represents a cached embedding entry
type EmbeddingCacheInterface ¶
type EmbeddingCacheInterface interface {
Get(key string) ([]float32, bool)
Set(key string, embedding []float32, ttl time.Duration) error
Delete(key string) error
Clear() error
Stats() EmbeddingCacheStats
}
EmbeddingCacheInterface defines the interface for embedding caches
type EmbeddingCacheStats ¶
type EmbeddingCacheStats struct {
Size int64 `json:"size"`
Hits int64 `json:"hits"`
Misses int64 `json:"misses"`
HitRate float64 `json:"hit_rate"`
}
EmbeddingCacheStats represents embedding cache statistics
type HealthStatus ¶
type HealthStatus struct {
Healthy bool `json:"healthy"`
Message string `json:"message"`
LastCheck time.Time `json:"last_check"`
Details json.RawMessage `json:"details"`
}
HealthStatus represents health status
type LLMConfig ¶
type LLMConfig struct {
Provider string `json:"provider"`
Model string `json:"model"`
APIKey string `json:"api_key"`
Endpoint string `json:"endpoint"`
MaxTokens int `json:"max_tokens"`
Temperature float32 `json:"temperature"`
TopP float32 `json:"top_p"`
Timeout time.Duration `json:"timeout"`
Headers map[string]string `json:"headers"`
}
LLMConfig holds configuration for LLM services
type LLMRequest ¶
type LLMRequest struct {
Model string `json:"model"`
Messages []ChatMessage `json:"messages"`
MaxTokens int `json:"max_tokens"`
Temperature float32 `json:"temperature"`
TopP float32 `json:"top_p"`
Stream bool `json:"stream"`
Stop []string `json:"stop"`
Metadata json.RawMessage `json:"metadata"`
}
LLMRequest represents a request to an LLM service
type LLMResponse ¶
type LLMResponse struct {
Content string `json:"content"`
Model string `json:"model"`
Usage TokenUsage `json:"usage"`
FinishReason string `json:"finish_reason"`
Error string `json:"error,omitempty"`
Duration time.Duration `json:"duration"`
RequestID string `json:"request_id"`
}
LLMResponse represents a response from an LLM service
type NetworkIntent ¶
type NetworkIntent struct {
ID string `json:"id"`
Type string `json:"type"`
Priority int `json:"priority"`
Description string `json:"description"`
Parameters json.RawMessage `json:"parameters"`
TargetResources []string `json:"target_resources"`
Constraints json.RawMessage `json:"constraints"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Status string `json:"status"`
}
NetworkIntent represents a network intent
type PoolConfig ¶
type PoolConfig struct {
MinConnections int `json:"min_connections"`
MaxConnections int `json:"max_connections"`
MaxIdleTime time.Duration `json:"max_idle_time"`
MaxLifetime time.Duration `json:"max_lifetime"`
HealthCheck bool `json:"health_check"`
HealthInterval time.Duration `json:"health_interval"`
}
PoolConfig represents configuration for connection pools
type PoolMetrics ¶
type PoolMetrics struct {
ActiveConnections int64 `json:"active_connections"`
IdleConnections int64 `json:"idle_connections"`
TotalConnections int64 `json:"total_connections"`
ConnectionsCreated int64 `json:"connections_created"`
ConnectionsDestroyed int64 `json:"connections_destroyed"`
HealthChecksRun int64 `json:"health_checks_run"`
HealthChecksFailed int64 `json:"health_checks_failed"`
AverageLatency time.Duration `json:"average_latency"`
}
PoolMetrics represents metrics for connection pools
type ResourceUsage ¶
type ResourceUsage struct {
CPUPercent float64 `json:"cpuPercent"`
MemoryPercent float64 `json:"memoryPercent"`
DiskPercent float64 `json:"diskPercent"`
NetworkInMBps float64 `json:"networkInMBps"`
NetworkOutMBps float64 `json:"networkOutMBps"`
ActiveConnections int `json:"activeConnections"`
}
ResourceUsage represents resource utilization
type ScalingIntent ¶
type ScalingIntent struct {
ID string `json:"id"`
ResourceType string `json:"resource_type"`
ResourceName string `json:"resource_name"`
TargetScale int `json:"target_scale"`
CurrentScale int `json:"current_scale"`
ScaleDirection string `json:"scale_direction"` // "up", "down", "auto"
Reason string `json:"reason"`
Metadata json.RawMessage `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
Status string `json:"status"`
}
ScalingIntent represents a scaling intent
type SearchQuery ¶
type SearchQuery struct {
Text string `json:"text"`
MaxResults int `json:"max_results"`
Threshold float64 `json:"threshold"`
Filters json.RawMessage `json:"filters"`
Namespace string `json:"namespace"`
}
SearchQuery represents a search query for RAG
type SearchResponse ¶
type SearchResponse struct {
Query string `json:"query"`
Results []*SearchResult `json:"results"`
TotalResults int `json:"total_results"`
ProcessedTime time.Duration `json:"processed_time"`
}
SearchResponse represents a response to a search query
type SearchResult ¶
type SearchResult struct {
ID string `json:"id"`
Content string `json:"content"`
Score float64 `json:"score"`
Metadata json.RawMessage `json:"metadata"`
Embedding []float32 `json:"embedding,omitempty"`
}
SearchResult represents a single search result
type ServiceConfig ¶
type ServiceConfig struct {
Name string `json:"name"`
Port int `json:"port"`
Host string `json:"host"`
TLS bool `json:"tls"`
Timeout time.Duration `json:"timeout"`
Retries int `json:"retries"`
CircuitBreaker *CircuitBreakerConfig `json:"circuit_breaker,omitempty"`
Metadata json.RawMessage `json:"metadata"`
}
ServiceConfig represents service configuration
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"`
}
SystemHealth represents the overall health of the system
type TokenUsage ¶
type TokenUsage struct {
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
}
TokenUsage represents token consumption details