OnAgentStart 通知所有中间件 Agent 启动
(ctx context.Context, agentID string)
| 78 | |
| 79 | // OnAgentStart 通知所有中间件 Agent 启动 |
| 80 | func (s *Stack) OnAgentStart(ctx context.Context, agentID string) error { |
| 81 | for _, m := range s.middlewares { |
| 82 | if err := m.OnAgentStart(ctx, agentID); err != nil { |
| 83 | return err |
| 84 | } |
| 85 | } |
| 86 | return nil |
| 87 | } |
| 88 | |
| 89 | // OnAgentStop 通知所有中间件 Agent 停止 |
| 90 | func (s *Stack) OnAgentStop(ctx context.Context, agentID string) error { |
nothing calls this directly
no test coverage detected