Package provides configuration params for all Insolar components and helper for config resources management.
Configuration struct is a root registry for all components config.
It provides constructor method NewConfiguration()
which creates new instance of configuration object filled with default values.
Each root level Insolar component has a constructor with config as argument. Each components should have its own config struct with the same name in this package. Each config struct should have constructor which returns instance with default params.
Package also provides Holder to easily manage config resources. It based on Viper config solution for Golang and helps to Marshal\Unmarshal config structs, manage files, ENV and command line variables.
Holder provides functionality to merge configuration from different sources.
- command line flags
- ENV variables
- yaml file
- Default config
Insolar cli tool helps user to manage configuration.
insolar config --help