add option style API in NewControlPlane for other control-plane to integrate
Add Priority of loading config: NewControlPlane Options > SystemEnv > YamlFile > Default
by this Priority order makes the unique value, when config-items were provided by several way,
If start OpenSergo directly, can also provide config-items by command args, which will adapt to NewControlPlane Options.
Describe how to verify it
exec ./main -h to get command args helps
add different values in command args, SystemEnv, yaml file
# command args : -p means give a port -c means the path of config
./main -p 8080 -c /opensergo.yaml
Signed-off-by: Jiangnan Jia jnan0806@gmail.com
Describe what this PR does / why we need it
Add configuration support
Does this pull request fix one issue?
Fixed #18
Describe how you did it
Describe how to verify it
./main -h
to get command args helpscommand args
,SystemEnv
,yaml file
Special notes for reviews