What problem does it solve?
genies_context is the application context management library for Genies, providing a global CONTEXT singleton, database pools, cache services, and JWT middleware to streamline bootstrapping and cross-service coordination.
Core Features & Use Cases
- Global context singleton (CONTEXT) to expose a single, thread-safe context across services.
- Multi-database support via RBatis with automatic driver selection for MySQL, PostgreSQL, SQLite, MSSQL, Oracle, and TDengine.
- Cache integration with Redis and a standard cache service for fast, scalable data access.
- JWT verification middleware (Keycloak integration) to protect endpoints and simplify authentication.
- Cross-service token management using REMOTE_TOKEN to share tokens between services.
- Kubernetes health probes support for ready/liveness checks to fit cloud-native deployments.
- Salvo authentication middleware to enforce security policies in HTTP routes.
Quick Start
Initialize the global CONTEXT during application startup to enable database connections, caching, and authentication.