blob: ff7fed8f303d8a46659d8a24f788311404e81c66 [file] [view]
## Capabilities
This service can be used to:
- [ ] ~~create_dir~~
- [x] stat
- [x] read
- [x] write
- [x] delete
- [ ] ~~list~~
- [ ] ~~copy~~
- [ ] ~~rename~~
- [ ] ~~presign~~
## Configuration
- `root`: Set the working directory of `OpenDAL`
- `endpoint`: Set the network address of redis server
- `cluster_endpoints`: Set the network address of redis cluster server. This parameter is mutually exclusive with the `endpoint` parameter.
- `username`: Set the username of Redis
- `password`: Set the password for authentication
- `db`: Set the DB of redis
You can refer to [`RedisBuilder`]'s docs for more information
## Example
### Via Builder
```rust,no_run
use opendal_core::Operator;
use opendal_core::Result;
use opendal_service_redis::Redis;
#[tokio::main]
async fn main() -> Result<()> {
let mut builder = Redis::default();
// this will build a Operator accessing Redis which runs on tcp://localhost:6379
let op: Operator = Operator::new(builder)?.finish();
Ok(())
}
```