You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/redis.rb
+34-14Lines changed: 34 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,26 @@ def self.current=(redis)
26
26
27
27
includeMonitorMixin
28
28
29
+
# Create a new client instance
30
+
#
31
+
# @param [Hash] options
32
+
# @option options [String] :url (value of the environment variable REDIS_URL) a Redis URL, for a TCP connection: `redis://:[password]@[hostname]:[port]/[db]` (password, port and database are optional), for a unix socket connection: `unix://[path to Redis socket]`. This overrides all other options.
33
+
# @option options [String] :host ("127.0.0.1") server hostname
34
+
# @option options [Fixnum] :port (6379) server port
35
+
# @option options [String] :path path to server socket (overrides host and port)
36
+
# @option options [Float] :timeout (5.0) timeout in seconds
37
+
# @option options [Float] :connect_timeout (same as timeout) timeout for initial connect in seconds
38
+
# @option options [String] :password Password to authenticate against server
39
+
# @option options [Fixnum] :db (0) Database to select after initial connect
40
+
# @option options [Symbol] :driver Driver to use, currently supported: `:ruby`, `:hiredis`, `:synchrony`
41
+
# @option options [String] :id ID for the client connection, assigns name to current connection by sending `CLIENT SETNAME`
42
+
# @option options [Hash, Fixnum] :tcp_keepalive Keepalive values, if Fixnum `intvl` and `probe` are calculated based on the value, if Hash `time`, `intvl` and `probes` can be specified as a Fixnum
43
+
# @option options [Fixnum] :reconnect_attempts Number of attempts trying to connect
44
+
# @option options [Boolean] :inherit_socket (false) Whether to use socket in forked process or not
45
+
# @option options [Array] :sentinels List of sentinels to contact
46
+
# @option options [Symbol] :role (:master) Role to fetch via Sentinel, either `:master` or `:slave`
0 commit comments