()
| 70 | } |
| 71 | |
| 72 | func (l *roundRobinLoadBalancer) NewQueryPlan() QueryPlan { |
| 73 | return &roundRobinQueryPlan{ |
| 74 | hosts: l.hosts.Load().([]*Host), |
| 75 | offset: atomic.AddUint32(&l.index, 1) - 1, |
| 76 | index: 0, |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | type roundRobinQueryPlan struct { |
| 81 | hosts []*Host |