|
| 1 | +# redis-enterprise |
| 2 | + |
| 3 | +A comprehensive Rust client library for the Redis Enterprise REST API. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- Complete coverage of Redis Enterprise REST API endpoints |
| 8 | +- Async/await support with tokio |
| 9 | +- Strong typing for API requests and responses |
| 10 | +- Comprehensive error handling |
| 11 | +- Support for all Redis Enterprise features including: |
| 12 | + - Cluster management and bootstrap |
| 13 | + - Database (BDB) operations |
| 14 | + - Node management and statistics |
| 15 | + - User and role management |
| 16 | + - Redis modules |
| 17 | + - Active-Active (CRDB) databases |
| 18 | + - Monitoring and alerts |
| 19 | + |
| 20 | +## Installation |
| 21 | + |
| 22 | +```toml |
| 23 | +[dependencies] |
| 24 | +redis-enterprise = "0.1.0" |
| 25 | +``` |
| 26 | + |
| 27 | +## Usage |
| 28 | + |
| 29 | +```rust |
| 30 | +use redis_enterprise::{EnterpriseClient, EnterpriseClientConfig}; |
| 31 | + |
| 32 | +#[tokio::main] |
| 33 | +async fn main() -> Result<(), Box<dyn std::error::Error>> { |
| 34 | + let config = EnterpriseClientConfig { |
| 35 | + base_url: "https://cluster.example.com:9443".to_string(), |
| 36 | + username: "[email protected]".to_string(), |
| 37 | + password: "your-password".to_string(), |
| 38 | + insecure: false, // Set to true for self-signed certificates |
| 39 | + }; |
| 40 | + |
| 41 | + let client = EnterpriseClient::new(config)?; |
| 42 | + |
| 43 | + // Get cluster information |
| 44 | + let cluster = client.get_cluster_info().await?; |
| 45 | + println!("Cluster: {:?}", cluster); |
| 46 | + |
| 47 | + // List databases |
| 48 | + let databases = client.list_databases().await?; |
| 49 | + println!("Databases: {:?}", databases); |
| 50 | + |
| 51 | + // Get node statistics |
| 52 | + let stats = client.get_node_stats("1").await?; |
| 53 | + println!("Node stats: {:?}", stats); |
| 54 | + |
| 55 | + Ok(()) |
| 56 | +} |
| 57 | +``` |
| 58 | + |
| 59 | +## API Coverage |
| 60 | + |
| 61 | +This library provides 100% coverage of the Redis Enterprise REST API, including: |
| 62 | + |
| 63 | +- **Cluster Operations** - Bootstrap, configuration, topology |
| 64 | +- **Database Management** - CRUD operations, actions, statistics |
| 65 | +- **Node Management** - Add/remove nodes, statistics, actions |
| 66 | +- **Security** - Users, roles, ACLs, LDAP integration |
| 67 | +- **Modules** - Upload and manage Redis modules |
| 68 | +- **Monitoring** - Stats, alerts, logs, diagnostics |
| 69 | +- **Active-Active** - CRDB management and tasks |
| 70 | +- **Administration** - License, certificates, services |
| 71 | + |
| 72 | +## Documentation |
| 73 | + |
| 74 | +For detailed API documentation, see the [Redis Enterprise REST API Reference](https://docs.redis.com/latest/rs/references/rest-api/). |
| 75 | + |
| 76 | +## License |
| 77 | + |
| 78 | +Licensed under either of |
| 79 | + |
| 80 | +- Apache License, Version 2.0 ([LICENSE-APACHE](../../LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) |
| 81 | +- MIT license ([LICENSE-MIT](../../LICENSE-MIT) or http://opensource.org/licenses/MIT) |
| 82 | + |
| 83 | +at your option. |
0 commit comments