mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 03:05:14 +00:00
Function service (#227)
This commit is contained in:
19
examples/function/deploy/go/deployAFunction.go
Executable file
19
examples/function/deploy/go/deployAFunction.go
Executable file
@@ -0,0 +1,19 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user