(endpoints []string)
| 57 | } |
| 58 | |
| 59 | func newRoundRobin(endpoints []string) routing.LBAlgorithm { |
| 60 | return &roundRobin{ |
| 61 | index: rand.Int64N(int64(len(endpoints))), // #nosec |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | // Apply implements routing.LBAlgorithm with a roundrobin algorithm. |
| 66 | func (r *roundRobin) Apply(ctx *routing.LBContext) routing.LBEndpoint { |