Expand description
Environment-driven configuration management. Environment-driven configuration for Rusty Memory.
This module loads and validates settings once at startup (via init_config) and exposes
a global, read‑only view through get_config. The configuration powers both the HTTP API and
the MCP server and includes:
- Qdrant connectivity (
QDRANT_URL,QDRANT_COLLECTION_NAME,QDRANT_API_KEY?). - Embedding provider/model (
EMBEDDING_PROVIDER,EMBEDDING_MODEL,EMBEDDING_DIMENSION,OLLAMA_URL?). - Chunking overrides (
TEXT_SPLITTER_CHUNK_SIZE?,TEXT_SPLITTER_CHUNK_OVERLAP?,TEXT_SPLITTER_USE_SAFE_DEFAULTS?). - Search ergonomics (
SEARCH_DEFAULT_LIMIT?,SEARCH_MAX_LIMIT?,SEARCH_DEFAULT_SCORE_THRESHOLD?). - Summarization (
SUMMARIZATION_PROVIDER?,SUMMARIZATION_MODEL?,SUMMARIZATION_MAX_WORDS?). - HTTP server port (
SERVER_PORT?).
Most fields are optional with sensible defaults; invalid combinations are flagged early with descriptive errors so misconfiguration is easy to diagnose.
Structs§
- Config
- Runtime configuration for the Rusty Memory server.
Enums§
- Config
Error - Errors encountered while loading configuration from environment variables.
- Embedding
Provider - Supported embedding backends for the processing pipeline.
- Summarization
Provider - Supported summarization backends for abstractive summaries.
Statics§
- CONFIG
- Global configuration cache populated during process start.
Functions§
- get_
config - Retrieve the loaded configuration, panicking if initialization has not occurred.
- init_
config - Load configuration from the environment and install it in the global cache.