-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
import Aws.Lambda
main :: IO ()
main =
runLambdaHaskellRuntime
defaultDispatcherOptions
(pure ())
id $ do
addAPIGatewayHandler "api-gateway" gatewayHandler
addALBHandler "alb" albHandler
addStandaloneLambdaHandler "standalone" regularHandler
gatewayHandler ::
ApiGatewayRequest request ->
Context context ->
IO (Either (ApiGatewayResponse error) (ApiGatewayResponse response))
gatewayHandler = doSomething
albHandler ::
ALBRequest request ->
Context context ->
IO (Either (ALBResponse error) (ALBResponse response))
albHandler = doSomething
regularHandler ::
request ->
Context context ->
IO (Either error response)
regularHandler = doSomething
addAPIGatewayHandler :: ... -> HandlersM 'APIGatewayHandlerType m context request response error ()
addALBHandler :: ... -> HandlersM 'ALBHandlerType m context request response error ()
addStandaloneLambdaHandler :: ... -> HandlersM 'StandaloneHandlerType m context request response error ()
runLambdaHaskellRuntime :: ... -> HandlersM handlerType m context request response error () -> IO ()
The monad is constrained to handlerType
.
A follow-up question:
Is this library maintained? Can I use it in production?
Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels