(endpoints []string)
| 78 | } |
| 79 | |
| 80 | func newRandom(endpoints []string) routing.LBAlgorithm { |
| 81 | // #nosec |
| 82 | return &random{ |
| 83 | rnd: rand.New(rand.NewPCG(uint64(time.Now().UnixNano()), 0)), |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | // Apply implements routing.LBAlgorithm with a stateless random algorithm. |
| 88 | func (r *random) Apply(ctx *routing.LBContext) routing.LBEndpoint { |
searching dependent graphs…