ConfigService class

Internal service parsing configuration files, command line arguments and environment variables.

The config path "datahub" is reserved for internal values:

datahub.environment defines the service environment. See enum values in Environment.

Some built-in services like LogService or KeyService define their own# set of config values within the "datahub" config path. TODO more docs

Inheritance

Constructors

ConfigService(Map<String, dynamic> defaultConfig, List<String> arguments)

Properties

arguments List<String>
final
configPath ConfigPath?
finalinherited
environment Environment
The services environment.
latefinaloverride-getter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceName String
The services identifier.
latefinal

Methods

addConfigArgument(String configArgument) → void
Add a single config value by using the command line syntax. This is usually used for command line argument parsing.
addConfigFile(File configFile) → void
Read and add config file into the config map.
config<T>(String path) → T
Fetches a configuration value from ConfigService.
inherited
configObject<T extends TransferObjectBase>(String path, TransferBean<T> bean) → T
Fetches a configuration value from ConfigService and parse it into the TransferObject.
inherited
fetch<T>(ConfigPath path) → T
Get a config value under the given path.
fetchObject<T extends TransferObjectBase>(ConfigPath path, TransferBean<T> bean) → T
Get a config value as map and parse it into the given TransferObject.
initialize() Future<void>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shutdown() Future<void>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited