| 333 | } |
| 334 | |
| 335 | func 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 | |
| 355 | func (s *Server) Run(context context.Context) { |
| 356 | s.log.Info("Hello from the function stream server!") |