From: Alexander Turenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Leonid Vasiliev <lvasiliev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH 1/2] cfg: provide types for logger options
Date: Thu, 15 Apr 2021 09:04:11 +0300 [thread overview]
Message-ID: <75b9f0d4add97b417bc4a01724f2b76939b14651.1618466243.git.alexander.turenko@tarantool.org> (raw)
In-Reply-To: <cover.1618466243.git.alexander.turenko@tarantool.org>
From: Cyrill Gorcunov <gorcunov@gmail.com>
This needed for fast type check when fetching
options from environment variable.
Part-of #5602
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
src/box/lua/load_cfg.lua | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua
index c444cc235..72e889071 100644
--- a/src/box/lua/load_cfg.lua
+++ b/src/box/lua/load_cfg.lua
@@ -119,6 +119,18 @@ local module_cfg = {
log_format = log.box_api,
}
+-- cfg types for modules, probably better to
+-- provide some API with type enumeration or
+-- similar. Currently it has use for environment
+-- processing only.
+local module_cfg_type = {
+ -- logging
+ log = 'string',
+ log_nonblock = 'boolean',
+ log_level = 'number, string',
+ log_format = 'string',
+}
+
-- types of available options
-- could be comma separated lua types or 'any' if any type is allowed
local template_cfg = {
--
2.30.0
next prev parent reply other threads:[~2021-04-15 6:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 6:04 [Tarantool-patches] [PATCH 0/2] Set box.cfg options using environment variables Alexander Turenko via Tarantool-patches
2021-04-15 6:04 ` Alexander Turenko via Tarantool-patches [this message]
2021-04-15 6:04 ` [Tarantool-patches] [PATCH 2/2] box: set box.cfg options via " Alexander Turenko via Tarantool-patches
2021-04-15 6:04 ` [Tarantool-patches] [PATCH 0/2] Set box.cfg options using " Leonid Vasiliev via Tarantool-patches
2021-04-15 6:13 ` Cyrill Gorcunov via Tarantool-patches
2021-04-15 6:52 ` Kirill Yukhin via Tarantool-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=75b9f0d4add97b417bc4a01724f2b76939b14651.1618466243.git.alexander.turenko@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=lvasiliev@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 1/2] cfg: provide types for logger options' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox