-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement ability to pass several URIs in different ways #2492
Comments
patiencedaur
added
server
[area] Task relates to Tarantool's server (core) functionality
feature
A new functionality
labels
Dec 16, 2021
patiencedaur
changed the title
implement ability to pass several URIs in different ways
[2pt] implement ability to pass several URIs in different ways
Dec 16, 2021
patiencedaur
changed the title
[2pt] implement ability to pass several URIs in different ways
[3pt] implement ability to pass several URIs in different ways
Dec 17, 2021
patiencedaur
changed the title
[3pt] implement ability to pass several URIs in different ways
[2pt] implement ability to pass several URIs in different ways
Dec 17, 2021
patiencedaur
changed the title
[2pt] implement ability to pass several URIs in different ways
implement ability to pass several URIs in different ways
Feb 9, 2022
There are many ways of passing URI with different parameters (same as in URI library tarantool/tarantool@37c3567): -- Single URI, passed as before
box.cfg({ listen = "/tmp/unix.sock" })
-- Single URI, with query paramters
box.cfg({ listen = "/tmp/unix.sock?q1=v1&q2=v2" })
-- Several URIs with parameters in one string, separated by commas
box.cfg({ listen = "/tmp/unix.sock_1?q=v, /tmp/unix.sock_2?q=v" })
-- Single URI passed in table, with additional parameters, passed
-- in "params" table. This parameters overwrite parameters from
-- URI string (q1 = "v2" in example below).
box.cfg({ listen = {"/tmp/unix.sock?q1=v1", params = {q1 = "v2"}} })
-- Several URIs passed in table with default parameters, passed
-- in "default_params" table, which are used for parameters, which
-- not specified for URI (q3 parameter with "v3" value corresponds
-- to all URIs, and used if there is no such parameter in URI).
box.cfg({ listen = {
"/tmp/unix.sock_1?q1=v1",
{ uri = "/tmp/unix.sock_2", params = { q2 = "v2" } },
default_params = { q3 = "v3" }
}
}) Recommended ways for URIs without parameters: -- 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}
}
} Recommended ways for URIs with parameters: box.cfg ({ listen = {
{uri = "127.0.0.1:3301", params = {q1 = "v1"}},
{uri = "/unix.sock", params = {q2 = "v2"}},
{uri = 3302, params = {q3 = "v3"}}
}
})
-- For single URI with parameter is also ok
box.cfg ({ listen = {
uri = 'localhost:3301',
params = {
transport = "ssl",
ssl_ca_file = "/path_to_ca_file",
ssl_cert_file = "/path_to_cert_file",
ssl_key_file = "/path_to_key_file"
}
}}) |
veod32
added a commit
that referenced
this issue
Feb 16, 2022
…meter and the new syntax for that Part of #2492
veod32
added a commit
that referenced
this issue
Feb 17, 2022
…cfg.listen and box.cfg.replication description Part of #2492
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Product: Tarantool
Since: 2.10.0
Audience/target: Tarantool users
Root document: TBD sections to update
SME: @ EvgenyMekhanik
Details
Now there are several ways to pass multiple URIs for box.cfg.listen
and box.cfg.replication:
Requested by @EvgenyMekhanik in tarantool/tarantool@4d10e25
While describing the new functional capabilities above, take into account the info from the related doc issue and dev PR
Из обсуждения с @ EvgenyMekhanik :
Указаны только эти варианты (синтаксиса), так они являются рекомендованными к использованию и не будут гарантированно изменяться со временем.
По этой фиче были вопросы у продактов. Эти указанные способы гарантированно сохранятся, и их и нужно (и только их!) указывать пользователям.
Возможно стоит сделать акцент на том, что эти способы рекомендованы.
The text was updated successfully, but these errors were encountered: