Files
services/examples/function/deploy/go/deployAFunction.go
2021-10-11 11:54:53 +01:00

20 lines
452 B
Go
Executable File

package example
import (
"fmt"
"github.com/micro/services/clients/go/function"
"os"
)
// Deploy a group of functions
func DeployAfunction() {
functionService := function.NewFunctionService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := functionService.Deploy(&function.DeployRequest{
Entrypoint: "helloworld",
Name: "my-first-func",
Project: "tests",
Repo: "github.com/crufter/gcloud-nodejs-test",
})
fmt.Println(rsp, err)
}