From e79bef023dc250e7a916a4afe93d6fa0c34599e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Lled=C3=B3?= Date: Wed, 31 Jul 2024 17:32:15 +0200 Subject: [PATCH] Update comment about sentinels parser (#399) * Update comment about sentinels parser * Apply suggestions from code review Co-authored-by: Daria Mayorova --------- Co-authored-by: Daria Mayorova --- lib/3scale/backend/storage_helpers.rb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/3scale/backend/storage_helpers.rb b/lib/3scale/backend/storage_helpers.rb index a135b07c..9e1c29db 100644 --- a/lib/3scale/backend/storage_helpers.rb +++ b/lib/3scale/backend/storage_helpers.rb @@ -196,22 +196,24 @@ def cfg_compact(options) # "redis_url0,redis_url1,redis_url2,....,redis_urlN" # Or an Array of Strings representing one URL each: # ["redis_url0", "redis_url1", ..., "redis_urlN"] - # Or an Array of Hashes with ":host", ":port", and ":password" (optional) keys: - # [{ host: "srv0", port: 7379 }, { host: "srv1", port: 7379, password: "abc" }, ...] - # # When using the String input, the comma "," character is the # delimiter between URLs and the "\" character is the escaper that # allows you to include commas "," and any other character verbatim in # a URL. # # Parse to expected format by redis client - # [ - # { host: "host0", port: "port0" }, - # { host: "host1", port: "port1" }, - # { host: "host2", port: "port2", password: "abc" }, - # ... - # { host: "hostN", port: "portN" } - # ] + # { + # sentinels: [ + # { host: "host0", port: "port0" }, + # { host: "host1", port: "port1" }, + # { host: "host2", port: "port2" }, + # ... + # { host: "hostN", port: "portN" } + # ], + # role: :master, + # sentinel_username: "user", + # sentinel_password: "password" + # } def cfg_sentinels_handler(options) # get role attr and remove from options # will only be validated and included when sentinels are valid