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

Function main

functions-framework/golang/Async/pubsub/sub/main.go:12–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

getLocalPluginsFunction · 0.70

Tested by

no test coverage detected