redisctl-core
Layer 2: Higher-level interface on top of redis-cloud and redis-enterprise clients.
This crate provides:
- Unified error handling - CoreError wrapping both platform errors
- Progress callbacks - For Cloud's async task polling
- Module resolution - Validate Enterprise modules before creation
- Workflows - Multi-step operations (create + wait, etc.)
Philosophy
Don't rebuild Layer 1. Use it and add value.
- Simple operations: Use Layer 1 directly (
redis_cloud::DatabaseHandler, etc.) - Operations with progress: Use Layer 2 workflows
- Operations with validation: Use Layer 2 helpers
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Layer 3: Consumers │
│ CLI (redisctl) MCP (redisctl-mcp) │
└──────────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Layer 2: redisctl-core │
│ - Unified errors (CoreError) │
│ - Progress callbacks (poll_task) │
│ - Module resolution (resolve_modules) │
│ - Workflows (create_and_wait, etc.) │
└──────────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Layer 1: Raw API Clients │
│ redis-cloud redis-enterprise │
└─────────────────────────────────────────────────────────────────┘
Example Usage
use ;
use ;
use Duration;
// Simple operation: use Layer 1 directly
let handler = new;
let databases = handler.list.await?;
// Operation with progress: use Layer 2
let task = handler.create.await?;
let completed = poll_task.await?;