Browse code

ndb_redis: regenerated text readme

Daniel-Constantin Mierla authored on 04/04/2016 07:25:15
Showing 1 changed files
... ...
@@ -14,9 +14,13 @@ Vicente Hernando
14 14
 
15 15
    <vhernando@systemonenoc.com>
16 16
 
17
-   Copyright © 2011 asipto.com
17
+Morten Isaksen
18 18
 
19
-   Copyright © 2012 www.systemonenoc.com
19
+   <misak@uni-tel.dk>
20
+
21
+   Copyright � 2011 asipto.com
22
+
23
+   Copyright � 2012 www.systemonenoc.com
20 24
      __________________________________________________________________
21 25
 
22 26
    Table of Contents
... ...
@@ -33,6 +37,8 @@ Vicente Hernando
33 33
 
34 34
               3.1. server (str)
35 35
               3.2. init_without_redis (integer)
36
+              3.3. connect_timeout (int)
37
+              3.4. cmd_timeout (int)
36 38
 
37 39
         4. Functions
38 40
 
... ...
@@ -43,8 +49,10 @@ Vicente Hernando
43 43
 
44 44
    1.1. Set server parameter
45 45
    1.2. Set init_without_redis parameter
46
-   1.3. redis_cmd usage
47
-   1.4. redis_free usage
46
+   1.3. Set connect_timeout parameter
47
+   1.4. Set cmd_timeout parameter
48
+   1.5. redis_cmd usage
49
+   1.6. redis_free usage
48 50
 
49 51
 Chapter 1. Admin Guide
50 52
 
... ...
@@ -60,6 +68,8 @@ Chapter 1. Admin Guide
60 60
 
61 61
         3.1. server (str)
62 62
         3.2. init_without_redis (integer)
63
+        3.3. connect_timeout (int)
64
+        3.4. cmd_timeout (int)
63 65
 
64 66
    4. Functions
65 67
 
... ...
@@ -95,6 +105,8 @@ Chapter 1. Admin Guide
95 95
 
96 96
    3.1. server (str)
97 97
    3.2. init_without_redis (integer)
98
+   3.3. connect_timeout (int)
99
+   3.4. cmd_timeout (int)
98 100
 
99 101
 3.1. server (str)
100 102
 
... ...
@@ -117,8 +129,8 @@ Chapter 1. Admin Guide
117 117
    Example 1.1. Set server parameter
118 118
 ...
119 119
 modparam("ndb_redis", "server", "name=srvN;addr=127.0.0.1;port=6379;db=1")
120
-modparam("ndb_redis", "server", "name=srvX;addr=127.0.0.2;port=6379;db=4;pass=m
121
-ypassword")
120
+modparam("ndb_redis", "server", "name=srvX;addr=127.0.0.2;port=6379;db=4;pass=my
121
+password")
122 122
 
123 123
 # Unix domain socket
124 124
 modparam("ndb_redis", "server", "name=srvY;unix=/tmp/redis.sock;db=3")
... ...
@@ -129,19 +141,43 @@ modparam("ndb_redis", "server", "name=srvY;unix=/tmp/redis.sock;db=3")
129 129
    If set to 1, the module will correctly initialize even if redis is not
130 130
    available at start up.
131 131
 
132
-   Default value is “0”.
132
+   Default value is "0".
133 133
 
134 134
    Example 1.2. Set init_without_redis parameter
135 135
 ...
136 136
 modparam("ndb_redis", "init_without_redis", 1)
137 137
 ...
138 138
 
139
+3.3. connect_timeout (int)
140
+
141
+   The timeout when connecting to the redis server
142
+
143
+   Default value is 1000 ms.
144
+
145
+   Example 1.3. Set connect_timeout parameter
146
+...
147
+modparam("ndb_redis", "connect_timeout", 500)
148
+...
149
+
150
+3.4. cmd_timeout (int)
151
+
152
+   The timeout for each query to the redis server. If the redis server
153
+   does not reply within the timeout value, the command will fail and
154
+   kamailio will continue executing the cfg file.
155
+
156
+   Default value is 1000 ms.
157
+
158
+   Example 1.4. Set cmd_timeout parameter
159
+...
160
+modparam("ndb_redis", "cmd_timeout", 500)
161
+...
162
+
139 163
 4. Functions
140 164
 
141 165
    4.1. redis_cmd(srvname, command, ..., replyid)
142 166
    4.2. redis_free(replyid)
143 167
 
144
-4.1.  redis_cmd(srvname, command, ..., replyid)
168
+4.1. redis_cmd(srvname, command, ..., replyid)
145 169
 
146 170
    Send a command to REDIS server identified by srvname. The reply will be
147 171
    stored in a local container identified by replyid. All the parameters
... ...
@@ -164,7 +200,7 @@ modparam("ndb_redis", "init_without_redis", 1)
164 164
      * value[n] - returns value of the nth element. value - returns null
165 165
        for an array. You need to get each element by index.
166 166
 
167
-   Example 1.3. redis_cmd usage
167
+   Example 1.5. redis_cmd usage
168 168
 ...
169 169
 if(redis_cmd("srvN", "INCR cnt", "r")) {
170 170
     # success - the incremented value is in $redis(r=>value)
... ...
@@ -196,7 +232,7 @@ if(redis_cmd("srvN", "HMGET foo_key field1 field3", "r")) {
196 196
 }
197 197
 ...
198 198
 
199
-4.2.  redis_free(replyid)
199
+4.2. redis_free(replyid)
200 200
 
201 201
    Frees data in a previous reply from memory. After this function call,
202 202
    accessing to a freed replyid returns null value.
... ...
@@ -205,7 +241,7 @@ if(redis_cmd("srvN", "HMGET foo_key field1 field3", "r")) {
205 205
    function. When ndb_redis module closes, all pending replies are freed
206 206
    automatically.
207 207
 
208
-   Example 1.4. redis_free usage
208
+   Example 1.6. redis_free usage
209 209
 ...
210 210
 After a redis command call:
211 211
         redis_cmd("srvN", "INCR cnt", "r");