MCPcopy Create free account
hub / github.com/astercloud/aster / StartAsync

Method StartAsync

pkg/tools/bridge/http_server.go:260–270  ·  view source on GitHub ↗

StartAsync 异步启动服务器

()

Source from the content-addressed store, hash-verified

258
259// StartAsync 异步启动服务器
260func (s *HTTPBridgeServer) StartAsync() error {
261 go func() {
262 if err := s.Start(); err != nil && !errors.Is(err, http.ErrServerClosed) {
263 fmt.Printf("HTTP Bridge Server error: %v\n", err)
264 }
265 }()
266
267 // 等待服务器启动
268 time.Sleep(100 * time.Millisecond)
269 return nil
270}
271
272// Shutdown 关闭服务器
273func (s *HTTPBridgeServer) Shutdown(ctx context.Context) error {

Callers 3

TestPTCIntegrationFunction · 0.95
mainFunction · 0.95

Calls 2

StartMethod · 0.95
PrintfMethod · 0.80

Tested by 2

TestPTCIntegrationFunction · 0.76