Skip to content

Commit

Permalink
Update comment about sentinels parser (#399)
Browse files Browse the repository at this point in the history
* Update comment about sentinels parser

* Apply suggestions from code review

Co-authored-by: Daria Mayorova <[email protected]>

---------

Co-authored-by: Daria Mayorova <[email protected]>
  • Loading branch information
jlledom and mayorova authored Jul 31, 2024
1 parent 470d6be commit e79bef0
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions lib/3scale/backend/storage_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e79bef0

Please sign in to comment.