Skip to content

Commit 2d2de77

Browse files
committed
Moved and marked deprecated functions
1 parent 457f534 commit 2d2de77

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

lib/resty/redis/connector.lua

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -123,21 +123,6 @@ function _M.new(config)
123123
end
124124

125125

126-
function _M.set_connect_timeout(self, timeout)
127-
self.config.connect_timeout = timeout
128-
end
129-
130-
131-
function _M.set_read_timeout(self, timeout)
132-
self.config.read_timeout = timeout
133-
end
134-
135-
136-
function _M.set_connection_options(self, options)
137-
self.config.connection_options = options
138-
end
139-
140-
141126
local function parse_dsn(params)
142127
local url = params.url
143128
if url and url ~= "" then
@@ -330,4 +315,23 @@ end
330315
_M.set_keepalive = set_keepalive
331316

332317

318+
319+
-- Deprecated: use config table in new() or connect() instead.
320+
function _M.set_connect_timeout(self, timeout)
321+
self.config.connect_timeout = timeout
322+
end
323+
324+
325+
-- Deprecated: use config table in new() or connect() instead.
326+
function _M.set_read_timeout(self, timeout)
327+
self.config.read_timeout = timeout
328+
end
329+
330+
331+
-- Deprecated: use config table in new() or connect() instead.
332+
function _M.set_connection_options(self, options)
333+
self.config.connection_options = options
334+
end
335+
336+
333337
return setmetatable(_M, fixed_field_metatable)

0 commit comments

Comments
 (0)