Expand description
Backend factory for storage layer initialization.
This module centralizes backend creation to:
- Reduce code duplication between
for_repoandfor_user - Enable easier backend swapping for testing
- Provide consistent error handling and graceful degradation
§Architecture
BackendFactory
├── create_embedder() → Arc<dyn Embedder>
├── create_index_backend() → Option<Arc<dyn IndexBackend>>
└── create_vector_backend() → Option<Arc<dyn VectorBackend>>§Graceful Degradation
Factory methods return Option for backends that may fail to initialize.
This allows the service container to continue with reduced functionality.
Structs§
- Backend
Factory - Factory for creating storage backends.
- Backend
Set - Result of backend initialization with optional components.