diff --git a/README.md b/README.md index 5de9c2da1..f45711ef3 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ To connect using Sentinel, use: SENTINELS = [{ host: "127.0.0.1", port: 26380 }, { host: "127.0.0.1", port: 26381 }] -redis = Redis.new(url: "redis://mymaster", sentinels: SENTINELS, role: :master) +redis = Redis.new(name: "mymaster", sentinels: SENTINELS, role: :master) ``` * The master name identifies a group of Redis instances composed of a master @@ -129,6 +129,12 @@ SENTINELS = [{ host: '127.0.0.1', port: 26380, password: 'mysecret' }, redis = Redis.new(name: 'mymaster', sentinels: SENTINELS, role: :master) ``` +Also the name can be passed as an url: + +```ruby +redis = Redis.new(name: "redis://mymaster", sentinels: SENTINELS, role: :master) +``` + ## Cluster support [Clustering](https://redis.io/topics/cluster-spec). is supported via the [`redis-clustering` gem](cluster/).