Skip to content

Commit d16113f

Browse files
committed
Update pages
1 parent 1403b1d commit d16113f

File tree

5 files changed

+152
-17
lines changed

5 files changed

+152
-17
lines changed

doc/dev_guide/internals/iproto/keys.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ Available IPROTO_FEATURES are the following:
471471
in the request header). Learn more about :ref:`sending transaction commands <box_protocol-stream_transactions>`.
472472

473473
- ``IPROTO_FEATURE_ERROR_EXTENSION = 2`` -- :ref:`MP_ERROR <msgpack_ext-error>`
474-
MsgPack extension support. Clients that don't support this feature will receive
474+
MsgPack extension support. Clients that don't support this feature receive
475475
error responses for :ref:`IPROTO_EVAL <box_protocol-eval>` and
476476
:ref:`IPROTO_CALL <box_protocol-call>` encoded to string error messages.
477477

doc/reference/reference_lua/box_iproto.rst

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ Submodule box.iproto
66
Since :doc:`2.11.0 </release/2.11.0>`.
77

88
The ``box.iproto`` submodule provides the ability to work with the network subsystem of Tarantool.
9-
The submodule is important for backward compatibility reason and enables to
9+
The submodule is important for backward compatibility and enables to
1010

1111
* extend the :ref:`binary protocol <box_protocol>` functionality from the Lua libraries
12-
* replace the built-in modules with the foreign ones
1312
* parse the unknown IPROTO requests
1413
* send arbitrary IPROTO packets
1514
* override the behavior of the existing request types in binary protocol
1615

17-
To make this possible, the submodule exports all IPROTO constants and features to Lua.
16+
To make this possible, the submodule exports all IPROTO :ref:`constants <box_iproto-constants>` and features to Lua.
1817

19-
Exported IPROTO constants and features
20-
--------------------------------------
18+
.. _box_iproto-constants:
19+
20+
IPROTO constants
21+
----------------
2122

2223
The IPROTO constants in the ``box.iproto`` namespace are written in the upper case without the ``IPROTO_`` prefix.
2324
The constants are divided into several types:
@@ -47,7 +48,23 @@ For example:
4748
box.iproto.raft_key.TERM = 0
4849
-- ...
4950
50-
This table lists all the available members and functions of the submodele:
51+
.. _box_iproto-features:
52+
53+
IPROTO features
54+
---------------
55+
56+
The submodule exports:
57+
58+
* the current IPROTO protocol version (:ref:`box.iproto.protocol_version <reference_lua-box_iproto_version>`)
59+
* the set of IPROTO protocol features supported by the server (:ref:`box.iproto.protocol_features <reference_lua-box_iproto_protocol-features>`)
60+
* the IPROTO protocol features with the corresponding code (:ref:`box.iproto.feature <reference_lua-box_iproto_feature>`)
61+
62+
.. _box_iproto-reference:
63+
64+
API reference
65+
-------------
66+
67+
The table lists all available members and functions of the submodule:
5168

5269
.. container:: table
5370

@@ -62,28 +79,37 @@ This table lists all the available members and functions of the submodele:
6279
- Use
6380

6481
* - :doc:`./box_iproto/keys`
65-
- request keys
82+
- Request keys
6683

6784
* - :doc:`./box_iproto/request_types`
68-
- request types
85+
- Request types
6986

7087
* - :doc:`./box_iproto/flags`
71-
- flags from the :ref:`IPROTO_FLAGS <box_protocol-flags>`>` key
88+
- Flags from the :ref:`IPROTO_FLAGS <box_protocol-flags>`>` key
7289

7390
* - :doc:`./box_iproto/ballot`
74-
- keys from the :ref:`IPROTO_BALLOT <box_protocol-ballots>` requests
91+
- Keys from the :ref:`IPROTO_BALLOT <box_protocol-ballots>` requests
7592

7693
* - :doc:`./box_iproto/metadata`
77-
- keys nested in the :ref:`IPROTO_METADATA <internals-iproto-keys-metadata>` key
94+
- Keys nested in the :ref:`IPROTO_METADATA <internals-iproto-keys-metadata>` key
7895

7996
* - :doc:`./box_iproto/raft`
80-
- keys from the ``IPROTO_RAFT*`` requests
97+
- Keys from the ``IPROTO_RAFT*`` requests
98+
99+
* - :doc:`./box_iproto/protocol_version`
100+
- Current IPROTO protocol version
101+
102+
* - :doc:`./box_iproto/protocol_features`
103+
- The set of supported IPROTO protocol features
104+
105+
* - :doc:`./box_iproto/feature`
106+
- IPROTO protocol features
81107

82-
* - :doc:`./box_iproto/override`
83-
- Set the IPROTO request handler callbacks
108+
* - :doc:`./box_iproto/override`
109+
- Set the IPROTO request handler callbacks
84110

85-
* - :doc:`./box_iproto/send`
86-
- Send an IPROTO packet over the session's socket
111+
* - :doc:`./box_iproto/send`
112+
- Send an IPROTO packet over the session's socket
87113

88114

89115
.. toctree::
@@ -96,5 +122,8 @@ This table lists all the available members and functions of the submodele:
96122
box_iproto/ballot
97123
box_iproto/metadata
98124
box_iproto/raft
125+
box_iproto/protocol_version
126+
box_iproto/protocol_features
127+
box_iproto/feature
99128
box_iproto/override
100129
box_iproto/send
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.. _reference_lua-box_iproto_feature:
2+
3+
box.iproto.feature
4+
==================
5+
6+
.. module:: box.iproto
7+
8+
.. data:: feature
9+
10+
The ``box.iproto.feature`` namespace contains the IPROTO protocol features supported by the server.
11+
Each feature is mapped to its corresponding code.
12+
Learn more: :ref:`IPROTO_FEATURES <internals-iproto-keys-features>`.
13+
14+
The features in the namespace are written
15+
16+
* in the lower case
17+
* without the ``IPROTO_FEATURE_`` prefix
18+
19+
Available features:
20+
21+
.. list-table::
22+
:header-rows: 1
23+
:widths: 40 20 40
24+
25+
* - Exported feature
26+
- IPROTO protocol feature
27+
- Code
28+
- Description
29+
30+
* - streams
31+
- :ref:`IPROTO_FEATURE_STREAMS <internals-iproto-keys-features>`
32+
- 0
33+
- :ref:`Stream <box_protocol-iproto_stream_id>` support
34+
35+
* - transactions
36+
- :ref:`IPROTO_SYNC <internals-iproto-keys-sync>`
37+
- 1
38+
- Transaction support
39+
40+
* - error_extension
41+
- :ref:`IPROTO_FEATURE_ERROR_EXTENSION <internals-iproto-keys-features>`
42+
- 2
43+
- :ref:`MP_ERROR <msgpack_ext-error>` MsgPack extension support
44+
45+
* - watchers
46+
- :ref:`IPROTO_FEATURE_WATCHERS <internals-iproto-keys-features>`
47+
- 3
48+
- Remote watchers support ( see :ref:`IPROTO_WATCH <box_protocol-watch>`,
49+
:ref:`IPROTO_UNWATCH <box_protocol-unwatch>`, and :ref:`IPROTO_EVENT <box_protocol-event>`)
50+
51+
* - pagination
52+
- :ref:`IPROTO_FEATURE_PAGINATION <internals-iproto-keys-features>`
53+
- 4
54+
- Pagination support
55+
56+
57+
**Example**
58+
59+
.. code-block:: lua
60+
61+
box.iproto.feature.streams = 0
62+
box.iproto.feature.transactions = 1
63+
box.iproto.feature.error_extension = 2
64+
box.iproto.feature.watchers = 3
65+
box.iproto.feature.pagination = 4
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. _reference_lua-box_iproto_protocol-features:
2+
3+
box.iproto.protocol_version
4+
===========================
5+
6+
.. module:: box.iproto
7+
8+
.. data:: protocol_version
9+
10+
The set of IPROTO protocol features supported by the server.
11+
Learn more: `src/box/iproto_features.h <https://github.com/tarantool/tarantool/blob/master/src/box/iproto_features.h>`__
12+
and `iproto_features_resolve() <https://github.com/tarantool/tarantool/blob/dec0e0221e183fa972efa65bb0fb658112f2196f/src/box/lua/net_box.lua#L93-L105>`__).
13+
14+
**Example**
15+
16+
.. code-block:: lua
17+
18+
box.iproto.protocol_features = {
19+
streams = true,
20+
transactions = true,
21+
error_extension = true,
22+
watchers = true,
23+
}
24+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. _reference_lua-box_iproto_version:
2+
3+
box.iproto.protocol_version
4+
===========================
5+
6+
.. module:: box.iproto
7+
8+
.. data:: protocol_version
9+
10+
Current IPROTO protocol version of the server.
11+
Learn more: :ref:`IPROTO_ID <box_protocol-id>`.
12+
13+
**Example**
14+
15+
.. code-block:: lua
16+
17+
box.iproto.protocol_version = 4

0 commit comments

Comments
 (0)