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

Function NewDefaultServer

server/server.go:335–353  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

333}
334
335func NewDefaultServer() (*Server, error) {
336 defaultConfig := &Config{
337 ListenAddr: ":7300",
338 Queue: QueueConfig{
339 Type: common.MemoryTubeType,
340 Config: common.ConfigMap{},
341 },
342 TubeConfig: map[string]common.ConfigMap{
343 common.PulsarTubeType: {
344 contube.PulsarURLKey: "pulsar://localhost:6650",
345 },
346 },
347 RuntimeConfig: map[string]common.ConfigMap{},
348 }
349 return NewServer(
350 WithTubeFactoryBuilders(GetBuiltinTubeFactoryBuilder()),
351 WithRuntimeFactoryBuilders(GetBuiltinRuntimeFactoryBuilder()),
352 WithConfig(defaultConfig))
353}
354
355func (s *Server) Run(context context.Context) {
356 s.log.Info("Hello from the function stream server!")

Callers 2

startServerFunction · 0.92

Calls 6

NewServerFunction · 0.85
WithTubeFactoryBuildersFunction · 0.85
WithConfigFunction · 0.85

Tested by 2

startServerFunction · 0.74