-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
featureA new functionalityA new functionality
Description
Let's hold config value inside cluster
and allow to modify it with the cbuilder
API.
This is convenient to don't write code like this in a test:
local config_1 = cbuilder:new(base_config)
:set_glogal_option(<...>)
:config()
local cluster = cluster:new(config_1)
-- <..do workload..>
local config_2 = cbuilder:new(config_1)
:set_glogal_option(<...>)
:config()
cluster:sync(config_2)
-- <..do workload..>
It is easy to take base_config
instead of config_1
in the second cbuilder:new
call by a mistake, for example.
I would like if the code above would look so:
local cluster = cluster:new(cbuilder:new(base_config)
:set_glogal_option(<...>)
:config())
-- <..do workload..>
cluster:sync(cbuilder:new(cluster:config())
:set_glogal_option(<...>)
:config())
-- <..do workload..>
Or, better:
local cluster = cluster:new(cbuilder:new(base_config)
:set_glogal_option(<...>)
:config())
-- <..do workload..>
cluster:modify_config() -- returns cbuilder object initialized with cluster:config()
:set_glogal_option(<...>) -- and saves all the modifications
cluster:sync() -- applies the previously created config
-- <..do workload..>
Naming is just what appears first in the head, let's discuss it.
Metadata
Metadata
Assignees
Labels
featureA new functionalityA new functionality