Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FallbackService ¶
type FallbackService struct {
// contains filtered or unexported fields
}
FallbackService provides reusable fallback logic for any API endpoint
func NewFallbackService ¶
func NewFallbackService(cfg *config.Config) *FallbackService
NewFallbackService creates a new fallback service
func (*FallbackService) Execute ¶
func (fs *FallbackService) Execute( c *fiber.Ctx, providers []models.Alternative, fallbackConfig models.FallbackConfig, executeFunc models.ExecutionFunc, requestID string, isStream bool, ) error
Execute runs the providers with the specified fallback configuration
func (*FallbackService) GetFallbackConfig ¶
func (fs *FallbackService) GetFallbackConfig(requestFallback *models.FallbackConfig) models.FallbackConfig
GetFallbackConfig gets the merged fallback configuration from config and request
Click to show internal directories.
Click to hide internal directories.