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

Function createTestFunction

server/function_store_test.go:72–99  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

70}
71
72func createTestFunction(name string) *model.Function {
73 return &model.Function{
74 Runtime: model.RuntimeConfig{
75 Type: common.WASMRuntime,
76 Config: map[string]interface{}{
77 common.RuntimeArchiveConfigKey: "../bin/example_basic.wasm",
78 },
79 },
80 Sources: []model.TubeConfig{
81 {
82 Type: common.MemoryTubeType,
83 Config: (&contube.SourceQueueConfig{
84 Topics: []string{"input"},
85 SubName: "test",
86 }).ToConfigMap(),
87 },
88 },
89 Sink: model.TubeConfig{
90 Type: common.MemoryTubeType,
91 Config: (&contube.SinkQueueConfig{
92 Topic: "output",
93 }).ToConfigMap(),
94 },
95 Name: name,
96 Replicas: 1,
97 Config: map[string]string{},
98 }
99}
100
101const yamlSeparator string = "---\n"
102

Callers 1

TestFunctionStoreLoadingFunction · 0.85

Calls 1

ToConfigMapMethod · 0.45

Tested by

no test coverage detected