Documentation
¶
Overview ¶
Package provider implements LLM provider management functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoHealthyProvider indicates that no healthy provider is available ErrNoHealthyProvider = errors.New("no healthy provider available") )
Functions ¶
This section is empty.
Types ¶
type HealthStatus ¶
type HealthStatus struct {
Healthy bool
LastCheck time.Time
ConsecutiveFails int
Latency time.Duration
ErrorCount int64
RequestCount int64
}
HealthStatus represents the current health state of a provider
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles LLM provider management, including: - Health monitoring - Failover handling - Provider configuration
func NewManager ¶
NewManager creates a new provider manager instance
func NewManagerWithProviders ¶
func NewManagerWithProviders(cfg *config.Config, logger *zap.Logger, providers map[string]gollm.LLM) *Manager
NewManagerWithProviders creates a manager with pre-configured providers (for testing)
func (*Manager) GetHealthyProvider ¶
GetHealthyProvider returns a healthy provider, implementing failover if needed
func (*Manager) StartHealthChecks ¶
StartHealthChecks begins monitoring all providers
Click to show internal directories.
Click to hide internal directories.