serverless-golang
serverless-golang copied to clipboard
How to implement wrapper around handler ?
Hi,
I want to implement a wrapper around handler to add some generic code.
Do you know how to implement this using serverless-golang.
Also I found an npm package for nodejs wrapper. Is it possible to use below npm package in the same?
https://github.com/maasglobal/serverless-wrapper-plugin
What's your use case?
I'm not using serverless to deploy my Lambda function but AutoSpotting is written in Go and can run in Lambda, as well as stand-alone from the CLI. I just extracted the content of the handler into a function, which I can call from the handler or another way of running that code.
Have a look at https://github.com/AutoSpotting/AutoSpotting/blob/master/autospotting.go#L35
Hi @cristim, Thanks for the reply. I am looking to add a rollbar error handler.
There is nodejs package for the same but I want to implement similar things for golang.
https://www.npmjs.com/package/lambda-rollbar