# RedisClusterMultilock
A multilock for redis cluster using lua scripts and given key(s) hopefully with shard key(s)
## Installation
The package can be installed by adding `redis_cluster_multilock` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:redis_cluster_multilock, "~> 0.1.0"}
]
end
```
in config.exs
```elixir
config :redis_cluster_multilock, :redis_cluster,
hosts: ["127.0.0.1"],
ports: [7001]
```
* Also an optional `pool_max_overflow` and `pool_size` which default to 5 and 20, respectively for the redis_cluster. For the application there's `default_life_ms` which defaults to 60000 and `default_sleep_ms` which defaults to 125.
## Information
* For keys being used please use a redis shard key that resolves to the same shard if giving many keys to lock see https://redis.io/topics/cluster-spec