redis

antelopejs/redis

Official
Redis client module with scheduling capabilities

Redis

@antelopejs/redis

npm versionLicenseTypeScript

A Redis client module that implements the Redis and Redis Scheduler interfaces for AntelopeJS.

For detailed documentation on the Redis interfaces, please refer to:

Installation

ajs project modules add @antelopejs/redis

Overview

The AntelopeJS Redis module provides functionality for interacting with Redis:

  • Redis client connection management
  • Task scheduling with retry capabilities

Configuration

The Redis module can be configured with standard Redis client options:

{
  "url": "redis://localhost:6379",
  "socket": {
    "reconnectStrategy": true
  }
}

Configuration Details

The module accepts the following configuration properties:

  • All standard Redis client options from the redis package
  • Supports all connection methods including URL string, socket options, etc.

Integration with Other Modules

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);
}

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.