Creates a configuration provider chain that searches for RStreams configurations
in a list of configuration providers specified by the {providers} property.
By default, the chain will use the {defaultProviders} to resolve configurations.
These providers will look in the environment using the
{RStreams.EnvironmentConfiguration} class with the 'LEO' and 'RSTREAMS' prefixes.
Each provider in the {providers} list should be a function that returns
a {RStreams.Configuration} object, or a hardcoded Configuration object. The function
form allows for delayed execution of the credential construction.
The above code will return the envProvider object if the
env contains configuration and the defaultProviders do not contain
any configuration settings.
The Configuring RStreams guide might be helpful.
Creates a configuration provider chain that searches for RStreams configurations in a list of configuration providers specified by the {providers} property.
By default, the chain will use the {defaultProviders} to resolve configurations. These providers will look in the environment using the {RStreams.EnvironmentConfiguration} class with the 'LEO' and 'RSTREAMS' prefixes.
Setting Providers
Each provider in the {providers} list should be a function that returns a {RStreams.Configuration} object, or a hardcoded Configuration object. The function form allows for delayed execution of the credential construction.
Resolving Configurations from a Chain
Call {resolve} to return the first valid credential object that can be loaded by the provider chain.
For example, to resolve a chain with a custom provider that checks a file on disk after the set of {defaultProviders}:
The above code will return the
envProvider
object if the env contains configuration and thedefaultProviders
do not contain any configuration settings.providers
defaultProviders