Handoff state management - atomic access to handoff metadata ShouldHandoff returns true if connection needs handoff (lock-free).
()
| 394 | |
| 395 | // ShouldHandoff returns true if connection needs handoff (lock-free). |
| 396 | func (cn *Conn) ShouldHandoff() bool { |
| 397 | if v := cn.handoffStateAtomic.Load(); v != nil { |
| 398 | return v.(*HandoffState).ShouldHandoff |
| 399 | } |
| 400 | return false |
| 401 | } |
| 402 | |
| 403 | // GetHandoffEndpoint returns the new endpoint for handoff (lock-free). |
| 404 | func (cn *Conn) GetHandoffEndpoint() string { |