# RedixClustered

Cluster support for Redix, and other stuff! Currently:

1. Very WIP
2. Needs documentation
3. Overall probably too opinionated

Ported from some other PRX applications, and working to improve.

## Installation

Add `redix_clustered` to your list of dependencies in `mix.exs`:

def deps do
    {:redix_clustered, "~> 0.1.0"}

Then just add your cluster as a child of your application:

children = [
  {RedixClustered, name: :my_redis, host: "", port: 6379, prefix: "anything"}

And then you can run commands by referencing your app name:

RedixClustered.get(:my_redis, "some-key")
RedixClustered.set(:my_redis, "some-key", "some-value")

# or if you left your cluster with name: nil

Or if you want to clone set commands to a 2nd redis cluster:

clone = [host: "", port: 6380]

children = [
  {RedixClustered, host: "", port: 6379, prefix: "anything", clone: clone}

## License

[MIT License](LICENSE)

## Contributing

1. Fork it
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create new Pull Request