3 ms·
Implementing a Go lambda is already more complicated than writing a function. It requires binding to a TCP port and receiving gob encoded values. AWS released a
by seniorsassycat 9y ago
Implementing a Go lambda is already more complicated than writing a function. It requires binding to a TCP port and receiving gob encoded values. AWS released a library that abstracts that into
// main.go
package main
import (
"github.com/aws/aws-lambda-go/lambda"
)
func hello() (string, error) {
return "Hello ƛ!", nil
}
func main() {
// Make the handler available for Remote Procedure Call by AWS Lambda
lambda.Start(hello)
}
lambda.Start is the abstraction wrapper.
- ogdoad 9y agoWhy is there a crossbar in the ƛ? Shouldn't it rather be λ?
- stochastic_monk 9y agoI think they have to divide by 2 pi to properly normalize it for a distributed filesystem, analogous to quantum's h-bar. [Edit: this is a joke. I think the person to whom I'm replying has a valid point.]
- seniorsassycat 9y agoI'm not sure, I copied that from the aws/aws-lambda-go repo https://github.com/aws/aws-lambda-go https://github.com/aws/aws-lambda-go