Goless
Goless is a serverless platform for Golang.
Functions
Here's an example of all you need to run your serverless function:
apiVersion: goless.io/v1beta1
kind: Function
metadata:
name: function-sample
spec:
service: "sample"
serverPort: 9000
function: |
package handlers
import (
"net/http"
)
func Handler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("This works!"))
}
Deploying
Either use the Makefile to deploy or the following commands (you will need kustomize)
CRDs
kustomize build config/crd | kubectl apply -f -
Controller
kustomize build config/default | kubectl apply -f -