MCPcopy Create free account
hub / github.com/OpenFunction/samples / main

Function main

functions-framework/golang/Knative/http/main.go:14–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12)
13
14func main() {
15 ctx := context.Background()
16 fwk, err := framework.NewFramework()
17 if err != nil {
18 klog.Exit(err)
19 }
20 fwk.RegisterPlugins(getLocalPlugins())
21 if err := fwk.Register(ctx, userfunction.HelloWorld); err != nil {
22 klog.Exit(err)
23 }
24 if err := fwk.Start(ctx); err != nil {
25 klog.Exit(err)
26 }
27}
28
29func getLocalPlugins() map[string]plugin.Plugin {
30 localPlugins := map[string]plugin.Plugin{

Callers

nothing calls this directly

Calls 1

getLocalPluginsFunction · 0.70

Tested by

no test coverage detected