[][src]Function lambda_runtime_core::start_with_config

pub fn start_with_config<Config, EventError>(
    f: impl Handler<EventError>,
    config: &Config,
    runtime: Option<TokioRuntime>
) where
    Config: ConfigProvider,
    EventError: Fail + LambdaErrorExt + Display + Send + Sync

Internal implementation of the start method that receives a config provider. This method is used for unit tests with a mock provider. The provider data is used to construct the HttpRuntimeClient which is then passed to the start_with_runtime_client() function.

Arguments

  • f A function pointer that conforms to the Handler type.
  • config An implementation of the ConfigProvider trait with static lifetime.

Panics

The function panics if the ConfigProvider returns an error from the get_runtime_api_endpoint() or get_function_settings() methods. The panic forces AWS Lambda to terminate the environment and spin up a new one for the next invocation.