Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runLambda :: (MonadUnliftIO m, MonadFail m, MonadThrow m, FromJSON a, ToJSON b, NFData a, NFData b) => (LambdaInvocation a -> m (LambdaResult b)) -> m ()
Documentation
runLambda :: (MonadUnliftIO m, MonadFail m, MonadThrow m, FromJSON a, ToJSON b, NFData a, NFData b) => (LambdaInvocation a -> m (LambdaResult b)) -> m () Source #
This function is intended to be your main
implementation. Given a handler for LambdaInvocation
instances,
it loops indefinitely (until AWS terminates the process) on the retrieval of invocations. It feeds each of those
invocations into the handler that was passed in as an argument. It then posts the result back to AWS and begins
the loop again.