Function lambda_runtime_types::exec_test [−][src]
pub fn exec_test<Shared, Event, Run, Return>(test_data: &str) -> Result<()> where
Shared: Default + Send + Sync,
Event: for<'de> Deserialize<'de> + Debug,
Run: Runner<Shared, Event, Return>,
Return: Serialize + Debug,
This is supported on crate feature
test
only.Expand description
Lambda entrypoint. This function can be used to test one or multiple lambda invocations locally.
Types:
Shared
: Type which is shared between lambda invocations. Note that lambda will create multiple environments for simulations invokations and environments are only kept alive for a certain time. It is thus not guaranteed that data can be reused, but with this types its possible.Event
: The expected Event which is being send to the lambda by AWS.Run
: Runner which is execued for each lambda invocation.Return
: Type which is the result of the lamba invocation being returned to AWS