comparison xml/en/docs/stream/ngx_stream_keyval_module.xml @ 2082:fee7627f6a5a

Updated docs for the upcoming NGINX Plus release.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 11 Dec 2017 12:13:09 +0300
parents xml/en/docs/http/ngx_http_keyval_module.xml@5382bfa8a770
children e1337bf9f63b
comparison
equal deleted inserted replaced
2081:f29bd40e9a62 2082:fee7627f6a5a
1 <?xml version="1.0"?>
2
3 <!--
4 Copyright (C) Nginx, Inc.
5 -->
6
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
8
9 <module name="Module ngx_stream_keyval_module"
10 link="/en/docs/stream/ngx_stream_keyval_module.html"
11 lang="en"
12 rev="1">
13
14 <section id="summary">
15
16 <para>
17 The <literal>ngx_stream_keyval_module</literal> module (1.13.7) creates variables
18 with values taken from key-value pairs managed by the
19 <link doc="../http/ngx_http_api_module.xml" id="stream_keyvals_">API</link>.
20 </para>
21
22 <para>
23 <note>
24 This module is available as part of our
25 <commercial_version>commercial subscription</commercial_version>.
26 </note>
27 </para>
28
29 </section>
30
31
32 <section id="example" name="Example Configuration">
33
34 <para>
35 <example>
36 http {
37
38 server {
39 ...
40 location /api {
41 api write=on;
42 }
43 }
44 }
45
46 stream {
47
48 keyval_zone zone=one:32k state=one.keyval;
49 keyval $ssl_server_name $name zone=one;
50
51 server {
52 listen 12345 ssl;
53 proxy_pass $name;
54 ssl_certificate /usr/local/nginx/conf/cert.pem;
55 ssl_certificate_key /usr/local/nginx/conf/cert.key;
56 }
57 }
58 </example>
59 </para>
60
61 </section>
62
63
64 <section id="directives" name="Directives">
65
66 <directive name="keyval">
67 <syntax>
68 <value>key</value>
69 <value>$variable</value>
70 <literal>zone</literal>=<value>name</value></syntax>
71 <default/>
72 <context>stream</context>
73
74 <para>
75 Creates a new <value>$variable</value> whose value
76 is looked up by the <value>key</value> in the key-value database.
77 Strings are matched ignoring the case.
78 The database is stored in a shared memory zone
79 specified by the <literal>zone</literal> parameter.
80 </para>
81
82 </directive>
83
84
85 <directive name="keyval_zone">
86 <syntax>
87 <literal>zone</literal>=<value>name</value>:<value>size</value>
88 [<literal>state</literal>=<value>file</value>]</syntax>
89 <default/>
90 <context>stream</context>
91
92 <para>
93 Sets the <value>name</value> and <value>size</value> of the shared memory zone
94 that keeps the key-value database.
95 Key-value pairs are managed by the
96 <link doc="ngx_http_api_module.xml" id="stream_keyvals_">API</link>.
97 </para>
98
99 <para>
100 The optional <literal>state</literal> parameter specifies a <value>file</value>
101 that keeps the current state of the key-value database in the JSON format
102 and makes it persistent across nginx restarts.
103 </para>
104
105 </directive>
106
107 </section>
108
109 </module>