Skip to content
Snippets Groups Projects
Commit 4d10e252 authored by mechanik20051988's avatar mechanik20051988 Committed by Kirill Yukhin
Browse files

box: implement ability to pass several URIs in different ways

Previously, for "listen" and "replication" options URI can be passed
as a number, as a string value or as a table, which contains numbers
and strings, no special properties for URIs was available. Now user
can pass URIs in different ways, same as in tarantool "uri" library:
as before, as a table which contains URI and it's parameters in "param"
table, as a table which contains URI strings and URI tables. Same
as in "uri" library, which internally used to parse new "listen" and
"replication" there are different ways to specify properties for URI:
in a string which contains URI, after '?' delimiter, in a table which
contains URI in "params" table, in "default_params" table if it is
default parameters for all URIs.

Closes #5928

@TarantoolBot document
Title: implement ability to pass several URIs in different ways
Now there are several ways to pass multiple URIs for box.cfg.listen
and box.cfg.replication:
```lua
-- As a string with one or several URIs separated by commas
-- (provides backward compatibility):
box.cfg { listen = "127.0.0.1:3301, /unix.sock, 3302" }
-- As an array which contains string URIs (unambiguous short form):
box.cfg { listen = {"127.0.0.1:3301", "/unix.sock", "3302"} }
-- As an array of tables with 'uri' field
-- (may be extended with more fields in future):
box.cfg {  listen = {
        {uri = "127.0.0.1:3301"},
        {uri = "/unix.sock"},
        {uri = 3302}
    }
}
```
parent 37c35677
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment