Configuration Files & Environmental Variables
The data provider's configuration files and environmental variables are both mechanisms for conveying the data provider's configuration information to its operating environment (e.g. the host server, connecting node, or KlayOracle protocol). However, unlike config files, environmental variables contain secret values and shouldn't be committed to your code repository.
In KlayOracle, data provider configuration files are defined within the data-providers/config.yml
file, while environmental variables are defined in the data-providers/.env
file.
To get up and running quickly, edit the sample config file, and copy the contents of env.example to your data-providers/.env
file.
config.yml
env
service_node
config.yaml
env | specifies the environment in which the data provider is currently running. Choices: - dev - stage - prod |
service_node | the IP address of the node which the data provider is connected to. |
feed
| |
path
| Path to the folder where the data provider's adapters (aka data feeds) are defined. This path is relative to the data-providers folder, |
adapters
| list of data feeds (aka adapters) you want the node to aggregate.
each data feed must match the file name in the folder defined in the "path" property.
Any adapter not defined within this list will not be aggregated by the node, even if its |
organization | |
k_org_id | |
name | |
website | Your organization website. |
ssl | |
key | This should be left blank |
certificate |
Relative path to the folder where the adapters (or data feeds) are defined. This path is
The list of adapters
To reference environmental variables as values in your config.yaml file (or other , use the syntax ${ENV_VAR}.
Last updated