Function service (#227)

This commit is contained in:
Janos Dobronszki
2021-10-11 11:54:53 +01:00
committed by GitHub
parent ee1674dda6
commit 599b418c20
36 changed files with 1988 additions and 41 deletions

View File

@@ -0,0 +1,17 @@
package example
import (
"fmt"
"github.com/micro/services/clients/go/function"
"os"
)
// Call a function
func CallAfunction() {
functionService := function.NewFunctionService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := functionService.Call(&function.CallRequest{
Name: "my-first-func",
Request: map[string]interface{}{},
})
fmt.Println(rsp, err)
}