• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 6709911304
88%

Build:
DEFAULT BRANCH: master
Ran 31 Oct 2023 05:07PM UTC
Jobs 1
Files 507
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Oct 2023 04:58PM UTC coverage: 86.381% (+0.03%) from 86.353%
6709911304

push

github

locker
lua: add helpers for encoding/decoding IPROTO packets

Closes #8054

@TarantoolBot document
Title: Document Lua helpers for encoding/decoding IPROTO packets

The following new constants and functions were added to the `box.iproto`
namespace:

 - `GREETING_SIZE`: Size of a Tarantool greeting message

 - `GREETING_PROTOCOL_LEN_MAX`: Max length of a protocol string that can
   be encoded in a Tarantool greeting message.

 - `GREETING_SALT_LEN_MAX`: Max length of a salt string that can be
   encoded in a Tarantool greeting message.

 - `box.iproto.encode_greeting({version = x, uuid = x, salt = x})`:
   Encodes a Tarantool greeting message. Takes a table. Returns a
   string. Raises on error. The protocol is set to "Binary" (IPROTO).

 - `box.iproto.decode_greeting(string)`: Decodes a Tarantool greeting
   message. Takes a string. Returns a table with the following fields:
   `protocol`, `version`, `uuid`, `salt`. Raises on error. The input
   string must be exactly `GREETING_SIZE` bytes long.

 - `box.iproto.encode_packet(header[, body])`: Encodes an IPROTO packet.
   Takes a packet header and optionally a body given as a table or a
   string. A table argument will be encoded in MsgPack. A string
   argument will be copied as is (it's supposed to contain valid MsgPack
   but it isn't enforced). Returns a string. Raises on error.

 - `box.iproto.decode_packet(string[, pos])`: Decodes an IPROTO packet.
   Takes a string containing one or more encoded IPROTO packets and
   optionally a position in the string to start decoding from. If the
   position is omitted, the function will start decoding from the
   beginning of the string. On success returns the decoded packet
   header, body, and the position in the string where decoding stopped.
   Both header and body are returned as `msgpack.object`. The body may
   be absent (set to nil). If the input is truncated, returns nil and
   the min number of bytes required to decode the packet. On failure,
   raises an... (continued)

65598 of 117990 branches covered (0.0%)

160 of 160 new or added lines in 1 file covered. (100.0%)

97527 of 112903 relevant lines covered (86.38%)

2645455.82 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6709911304.1 31 Oct 2023 05:07PM UTC 0
86.38
GitHub Action Run
Source Files on build 6709911304
Detailed source file information is not available for this build.
  • Back to Repo
  • 22580990 on github
  • Prev Build on master (#6706099968)
  • Next Build on master (#6719388900)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc