ContainerConfigReader

Helper class that reads a container’s configuration from a JSON or YAML file.

Description

The ContainerConfigReader class allows you to read a container’s configuration from a JSON or YAML file.

Static methods

readFromFile

Reads a container’s configuration from JSON or YAML file. The type of the file is determined by the file extension.

static Future<ContainerConfig> readFromFile(String? correlationId, String? path, ConfigParams parameters)

  • correlationId: String? - (optional) transaction id used to trace execution through the call chain.
  • path: String? - path to the component’s configuration file.
  • parameters: ConfigParams - configuration parameters or null to skip parameterization.
  • returns: Future<ContainerConfig> - read container configuration

readFromJsonFile

Reads a container’s configuration from a JSON file.

static Future<ContainerConfig> readFromJsonFile(String? correlationId, String path, ConfigParams parameters)

  • correlationId: String? - (optional) transaction id used to trace execution through the call chain.
  • path: String - path to the component’s configuration file.
  • parameters: ConfigParams - configuration parameters or null to skip parameterization.
  • returns: Future<ContainerConfig> - read container configuration

readFromYamlFile

Reads container configuration from a YAML file.

static Future<ContainerConfig> readFromYamlFile(String? correlationId, String path, ConfigParams parameters)

  • correlationId: String? - (optional) transaction id used to trace execution through the call chain.
  • path: String - path to the component’s configuration file.
  • parameters: ConfigParams - configuration parameters or null to skip parameterization.
  • returns: Future<ContainerConfig> - read container configuration