Module: sip-router
Branch: 3.2
Commit: 2ffbba2004371c1136157bcf8ba60fab787de9ad
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2ffbba2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Nov 15 09:27:46 2011 +0100
ndb_redis: docs update - server parameter type is string
- more details to server parameters to show that many redis servers can
be used
(cherry picked from commit da07d2a093a4aec9673ae2e5a0bd4bccb9d3cd70)
---
modules/ndb_redis/README | 17 +++++++++++------
modules/ndb_redis/doc/ndb_redis_admin.xml | 11 +++++++++--
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/modules/ndb_redis/README b/modules/ndb_redis/README
index ad30b57..d678e65 100644
--- a/modules/ndb_redis/README
+++ b/modules/ndb_redis/README
@@ -10,7 +10,7 @@ Daniel-Constantin Mierla
<miconda(a)gmail.com>
- Copyright © 2011
asipto.com
+ Copyright � 2011
asipto.com
__________________________________________________________________
Table of Contents
@@ -25,7 +25,7 @@ Daniel-Constantin Mierla
3. Parameters
- 3.1. server (int)
+ 3.1. server (str)
4. Functions
@@ -48,7 +48,7 @@ Chapter 1. Admin Guide
3. Parameters
- 3.1. server (int)
+ 3.1. server (str)
4. Functions
@@ -81,9 +81,9 @@ Chapter 1. Admin Guide
3. Parameters
- 3.1. server (int)
+ 3.1. server (str)
-3.1. server (int)
+3.1. server (str)
Specify the details to connect to REDIS server. It takes a list of
attribute=value separated by semicolon, the attributes can be name,
@@ -92,18 +92,23 @@ Chapter 1. Admin Guide
REDIS server. db is the DB number to use (defaults to 0 if not
specified).
+ You can set this parameter many times, in case you want to connect to
+ many REDIS servers, just give different attributes and use the specific
+ server name when querying the REDIS instance.
+
Default value is NULL.
Example 1.1. Set server parameter
...
modparam("ndb_redis", "server",
"name=srvN;addr=127.0.0.1;port=6379;db=1")
+modparam("ndb_redis", "server",
"name=srvX;addr=127.0.0.2;port=6379;db=4")
...
4. Functions
4.1. redis_cmd(srvname, command, replyid)
-4.1. redis_cmd(srvname, command, replyid)
+4.1. redis_cmd(srvname, command, replyid)
Send a command to REDIS server identified by srvname. The reply will be
stored in a local continer identified by replyid. All the parameters
diff --git a/modules/ndb_redis/doc/ndb_redis_admin.xml
b/modules/ndb_redis/doc/ndb_redis_admin.xml
index c6bfb8f..02e3ac7 100644
--- a/modules/ndb_redis/doc/ndb_redis_admin.xml
+++ b/modules/ndb_redis/doc/ndb_redis_admin.xml
@@ -60,13 +60,19 @@
<section>
<title>Parameters</title>
<section>
- <title><varname>server</varname> (int)</title>
+ <title><varname>server</varname> (str)</title>
<para>
Specify the details to connect to REDIS server. It takes a list of
attribute=value separated by semicolon, the attributes can be
name, addr, port and db. Name is a generic identifier to be used with
module functions. addr and port are the IP address and the port to
- connect to REDIS server. db is the DB number to use (defaults to 0 if not specified).
+ connect to REDIS server. db is the DB number to use (defaults to 0 if
+ not specified).
+ </para>
+ <para>
+ You can set this parameter many times, in case you want to connect to
+ many REDIS servers, just give different attributes and use the specific
+ server name when querying the REDIS instance.
</para>
<para>
<emphasis>
@@ -78,6 +84,7 @@
<programlisting format="linespecific">
...
modparam("ndb_redis", "server",
"name=srvN;addr=127.0.0.1;port=6379;db=1")
+modparam("ndb_redis", "server",
"name=srvX;addr=127.0.0.2;port=6379;db=4")
...
</programlisting>
</example>