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

Method Stop

pkg/asteros/interfaces/agui.go:96–112  ·  view source on GitHub ↗

Stop 停止 AGUI Interface

(ctx context.Context)

Source from the content-addressed store, hash-verified

94
95// Stop 停止 AGUI Interface
96func (i *AGUIInterface) Stop(ctx context.Context) error {
97 // 取消同步循环
98 if i.cancel != nil {
99 i.cancel()
100 }
101
102 // 断开连接
103 if err := i.disconnect(ctx); err != nil {
104 return fmt.Errorf("disconnect from control plane: %w", err)
105 }
106
107 if i.opts.EnableLogging {
108 fmt.Printf("✓ AGUI Interface stopped\n")
109 }
110
111 return nil
112}
113
114// OnAgentRegistered Agent 注册事件
115func (i *AGUIInterface) OnAgentRegistered(ag *agent.Agent) error {

Callers

nothing calls this directly

Calls 3

disconnectMethod · 0.95
PrintfMethod · 0.80
cancelMethod · 0.45

Tested by

no test coverage detected