handleGetStatus 处理获取状态
(_ *actor.Context, msg *GetStatusMsg)
| 430 | |
| 431 | // handleGetStatus 处理获取状态 |
| 432 | func (a *AgentActor) handleGetStatus(_ *actor.Context, msg *GetStatusMsg) { |
| 433 | status := a.agent.Status() |
| 434 | |
| 435 | if msg.ReplyTo != nil { |
| 436 | select { |
| 437 | case msg.ReplyTo <- status: |
| 438 | default: |
| 439 | } |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | // handleStop 处理停止 |
| 444 | func (a *AgentActor) handleStop() { |