A Redis client module that implements the Redis and Redis Scheduler interfaces for AntelopeJS.
ajs project modules add @antelopejs/redisThis module implements two key interfaces:
- Redis Interface: Promise-based Redis client with key-value operations and pub/sub messaging.
- Redis Scheduler Interface: Redis-based distributed task scheduler with job queuing and automatic retries.
Both interfaces can be used independently or together depending on your application's needs. The interfaces are installed separately to maintain modularity and minimize dependencies.
| Name | Install command | |
|---|---|---|
| Redis | ajs module imports add redis |
Documentation |
| Redis Scheduler | ajs module imports add redis_scheduler |
Documentation |
The AntelopeJS Redis module provides functionality for interacting with Redis:
- Redis client connection management
- Task scheduling with retry capabilities
The Redis module can be configured with standard Redis client options:
{
"url": "redis://localhost:6379",
"lazyConnect": true
}The module accepts the following configuration properties:
- All standard Redis client options from the
ioredispackage - Supports all connection methods including URL string, socket options, etc.
The Redis module is designed to be used as a dependency for other AntelopeJS modules:
// Example of another module depending on Redis
import { GetClient } from '@ajs/redis/beta';
async function storeValueInRedis(key: string, value: string) {
const client = await GetClient();
await client.set(key, value);
}This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
