Răsfoiți Sursa

ndb_redis: docs update - server parameter type is string

- more details to server parameters to show that many redis servers can
  be used
Daniel-Constantin Mierla 14 ani în urmă
părinte
comite
da07d2a093
2 a modificat fișierele cu 20 adăugiri și 8 ștergeri
  1. 11 6
      modules/ndb_redis/README
  2. 9 2
      modules/ndb_redis/doc/ndb_redis_admin.xml

+ 11 - 6
modules/ndb_redis/README

@@ -10,7 +10,7 @@ Daniel-Constantin Mierla
 
 
    <[email protected]>
    <[email protected]>
 
 
-   Copyright © 2011 asipto.com
+   Copyright © 2011 asipto.com
      __________________________________________________________________
      __________________________________________________________________
 
 
    Table of Contents
    Table of Contents
@@ -25,7 +25,7 @@ Daniel-Constantin Mierla
 
 
         3. Parameters
         3. Parameters
 
 
-              3.1. server (int)
+              3.1. server (str)
 
 
         4. Functions
         4. Functions
 
 
@@ -48,7 +48,7 @@ Chapter 1. Admin Guide
 
 
    3. Parameters
    3. Parameters
 
 
-        3.1. server (int)
+        3.1. server (str)
 
 
    4. Functions
    4. Functions
 
 
@@ -81,9 +81,9 @@ Chapter 1. Admin Guide
 
 
 3. Parameters
 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
    Specify the details to connect to REDIS server. It takes a list of
    attribute=value separated by semicolon, the attributes can be name,
    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
    REDIS server. db is the DB number to use (defaults to 0 if not
    specified).
    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.
    Default value is NULL.
 
 
    Example 1.1. Set server parameter
    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=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. Functions
 
 
    4.1. redis_cmd(srvname, command, replyid)
    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
    Send a command to REDIS server identified by srvname. The reply will be
    stored in a local continer identified by replyid. All the parameters
    stored in a local continer identified by replyid. All the parameters

+ 9 - 2
modules/ndb_redis/doc/ndb_redis_admin.xml

@@ -60,13 +60,19 @@
 	<section>
 	<section>
 	<title>Parameters</title>
 	<title>Parameters</title>
 	<section>
 	<section>
-		<title><varname>server</varname> (int)</title>
+		<title><varname>server</varname> (str)</title>
 		<para>
 		<para>
 			Specify the details to connect to REDIS server. It takes a list of
 			Specify the details to connect to REDIS server. It takes a list of
 			attribute=value separated by semicolon, the attributes can be
 			attribute=value separated by semicolon, the attributes can be
 			name, addr, port and db. Name is a generic identifier to be used with
 			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
 			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>
 		<para>
 		<para>
 		<emphasis>
 		<emphasis>
@@ -78,6 +84,7 @@
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
 ...
 ...
 modparam("ndb_redis", "server", "name=srvN;addr=127.0.0.1;port=6379;db=1")
 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>
 </programlisting>
 		</example>
 		</example>