DataDog / datadog-lambda-go

The Datadog AWS Lambda package for Go
Apache License 2.0
59 stars 40 forks source link

Support `lambda.StartHandler`. #72

Closed zbintliff closed 3 years ago

zbintliff commented 3 years ago

Expected Behavior

DD only supports lambda.Start() which limits some of the functionality and uses of lambda. The difference between lambda.Start() and lambda.StartHandler() is that the former takes care of the serialization while the second operates and returns a []byte and accepts a struct that impliments Invoke()

For teams that have many lambdas that implement lambda.StartHandler() the lift to use DD is harder than if DD just supported that call behavior as well its an easier transition for teams.

DarcyRaynerDD commented 3 years ago

Hi @zbintliff I've just released 1.1.0 which adds the 'WrapLambdaHandlerInterface' method, which can be passed to StartHandler. Let me know if that addresses your use case.