github.com/braveheart12/just@v0.8.7/configuration/README.md (about)

     1  Insolar – Configuration
     2  ===============
     3  
     4  [![GoDoc](https://godoc.org/github.com/insolar/insolar/configuration?status.svg)](https://godoc.org/github.com/insolar/insolar/configuration)
     5  
     6  
     7  Package provides configuration params for all Insolar components and helper for config resources management.
     8  
     9  ### Configuration
    10  
    11  Configuration struct is a root registry for all components config.
    12  It provides constructor method `NewConfiguration()` which creates new instance of configuration object filled with default values.
    13  
    14  Each root level Insolar component has a constructor with config as argument.
    15  Each components should have its own config struct with the same name in this package.
    16  Each config struct should have constructor which returns instance with default params.
    17  
    18  ### Holder
    19  
    20  Package also provides [Holder](https://godoc.org/github.com/insolar/insolar/configuration#Holder) to easily manage config resources. 
    21  It based on [Viper config solution for Golang](https://github.com/spf13/viper) and helps to Marshal\Unmarshal config structs, manage files, ENV and command line variables.
    22  
    23  Holder provides functionality to merge configuration from different sources.
    24  
    25  #### Merge priority
    26  
    27  1. command line flags
    28  2. ENV variables
    29  3. yaml file
    30  4. Default config
    31  
    32  ### Manage configuration from cli
    33  
    34  Insolar cli tool helps user to manage configuration.
    35  
    36  ```
    37  insolar config --help
    38  ```