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

Method stopInterfaces

pkg/asteros/asteros.go:310–322  ·  view source on GitHub ↗

stopInterfaces 停止所有 Interfaces

()

Source from the content-addressed store, hash-verified

308
309// stopInterfaces 停止所有 Interfaces
310func (os *AsterOS) stopInterfaces() error {
311 os.ifMu.RLock()
312 defer os.ifMu.RUnlock()
313
314 var lastErr error
315 for name, iface := range os.interfaces {
316 if err := iface.Stop(os.ctx); err != nil {
317 lastErr = fmt.Errorf("stop interface %s: %w", name, err)
318 }
319 }
320
321 return lastErr
322}
323
324// notifyAgentRegistered 通知所有 Interfaces Agent 已注册
325func (os *AsterOS) notifyAgentRegistered(ag *agent.Agent) {

Callers 1

ShutdownMethod · 0.95

Calls 1

StopMethod · 0.65

Tested by

no test coverage detected