Martin Heinz put together this article on building serverless OpenFaaS application with Go. OpenFaaS which is open source Function as a Service tool for developing cloud-native serverless applications.
You will learn how to setup (IMHO) the ideal project and workflow for developing OpenFaaS functions, as well as creating your first function using Golang.
You might be asking, why - out of all the frameworks like AWS Lambda, Google Cloud Run, OpenWhisk etc. - would I choose OpenFaaS?
- No Vendor-Lock
- Cloud Native
- Any Language
- Performance
To run the functions we need a cloud environment and considering that we will be using local machine, we should probably choose the most lightweight option possible, here author will use Ranchers k3s (alternatively you could also use KinD).
The article then dives into detailed steps how to build your own version of OpenFaas and your first Go function, including set up, unit tests, automation with Taskfile for function deployment, simple CI/CD. Excellent!
[Read More]