MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / GetOutputTopic

Function GetOutputTopic

admin/utils/utils.go:81–90  ·  view source on GitHub ↗
(f *adminclient.ModelFunction)

Source from the content-addressed store, hash-verified

79}
80
81func GetOutputTopic(f *adminclient.ModelFunction) (string, error) {
82 config := f.Sink.Config
83 if len(config) < 1 {
84 return "", fmt.Errorf("sink config for function %s is empty", f.Name)
85 }
86 if topic, ok := config["output"].(string); ok {
87 return topic, nil
88 }
89 return "", fmt.Errorf("sink config for function %s has no output topic", f.Name)
90}

Callers 1

RunMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected