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

Method disconnect

pkg/asteros/interfaces/agui.go:167–182  ·  view source on GitHub ↗

disconnect 断开连接

(ctx context.Context)

Source from the content-addressed store, hash-verified

165
166// disconnect 断开连接
167func (i *AGUIInterface) disconnect(ctx context.Context) error {
168 i.mu.Lock()
169 defer i.mu.Unlock()
170
171 // TODO: 实现实际的断开逻辑
172 // 1. 注销 AsterOS 实例
173 // 2. 关闭 WebSocket 连接
174
175 i.connected = false
176
177 if i.opts.EnableLogging {
178 fmt.Printf(" [AGUI] Disconnected from Control Plane\n")
179 }
180
181 return nil
182}
183
184// syncLoop 同步循环
185func (i *AGUIInterface) syncLoop(ctx context.Context) {

Callers 1

StopMethod · 0.95

Calls 1

PrintfMethod · 0.80

Tested by

no test coverage detected