redis_conf = {
connections = {
{host = '127.0.0.1', port = '6379'},
{host = '127.0.0.1', port = '6389'},
},
options = {
replication = 'sentinel',
service = 'service_name',
parameters = {
password = 'password',
database = 1,
}
},
}
So easy! Lookup Code!
redis_conf = {
server = {
{host = "127.0.0.1", port = 6379},
{host = "127.0.0.1", port = 6389},
}
}local redis = require 'c_redis.lua'
local redis_conf = redis_conf
local rc = redis.new(redis_conf)
local res, err = rc:get(redis_key)
--- ...