cfg: new cfg api, without explicit passing of cfg options
With structured configuration, i.e. a Lua table for a list of replication peers, it is difficult to pass a configuration option to the hook function as a single C object. Don't pass options in, but query them from the hook function with cfg_get* API. As a result, all "change" hooks have the same signature now, a step closer to the pluggable configuration API.
Showing
- src/box/box.cc 27 additions, 18 deletionssrc/box/box.cc
- src/box/box.h 8 additions, 8 deletionssrc/box/box.h
- src/box/lua/load_cfg.lua 20 additions, 14 deletionssrc/box/lua/load_cfg.lua
- src/box/lua/snapshot_daemon.lua 5 additions, 5 deletionssrc/box/lua/snapshot_daemon.lua
- src/lua/log.lua 7 additions, 1 deletionsrc/lua/log.lua
- test/app/console.test.lua 2 additions, 1 deletiontest/app/console.test.lua
- test/box/cfg.result 9 additions, 9 deletionstest/box/cfg.result
Loading
Please register or sign in to comment