Quick Microservices Redis - qm-redis
utilities to work with the Redis database
GitHub repository ⏺ Cargo package ⏺ Docs
Description
With this crate it is easy to get a Redis configuration with the most common settings. It also provides common helpers to handle locks and use workers with queues.
Usage
let redis_config = new?;
The Config is populated with environment variables. By default, all variables with the prefix
REDIS_ are considered.
The prefix can be changed by using a builder pattern.
let example_config = builder.with_prefix.build?;
Variables and Defaults
These variables are available and are set with the following defaults.
| variable | struct field | default |
|---|---|---|
| MONGODB_HOST | host | "127.0.0.1" |
| MONGODB_PORT | port | 6379 |
| address | redis://{host}:{port}/ |