run method

Future run()

Runs this Azure function, loads container configuration, instantiate components and manage their lifecycle, makes this function ready to access action calls.

Return Future that receives null for success. Throws error

Implementation

Future run() async {
  var context = Context.fromTraceId(info?.name ?? '');

  try {
    var path = _getConfigPath();
    var parameters = _getParameters();
    readConfigFromFile(context, path, parameters);
    _captureExit(context);
    await open(context);
  } catch (ex) {
    logger.fatal(
      context,
      ex as Exception,
      'Process is terminated',
    );
    exit(1);
  }
}