- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for newLBConnection (0.36 sec)
-
pkg/test/loadbalancersim/loadbalancer/roundrobin.go
} } // Shuffle the connections. rand.Shuffle(len(lbConns), func(i, j int) { lbConns[i], lbConns[j] = lbConns[j], lbConns[i] }) return &roundRobin{ weightedConnections: newLBConnection("RoundRobinLB", lbConns), } } type roundRobin struct { *weightedConnections next int nextMutex sync.Mutex } func (lb *roundRobin) Request(onDone func()) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 03 18:19:25 UTC 2022 - 1.5K bytes - Viewed (0) -
pkg/test/loadbalancersim/loadbalancer/weight.go
) type WeightedConnection struct { network2.Connection Weight uint32 } type weightedConnections struct { conns []*WeightedConnection helper *network2.ConnectionHelper } func newLBConnection(name string, conns []*WeightedConnection) *weightedConnections { return &weightedConnections{ conns: conns, helper: network2.NewConnectionHelper(name), } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 03 18:19:25 UTC 2022 - 2.8K bytes - Viewed (0) -
pkg/test/loadbalancersim/loadbalancer/leastrequest.go
ActiveRequestBias float64 } func NewLeastRequest(s LeastRequestSettings) network.Connection { if len(s.Connections) == 0 { panic("attempting to create load balancer with zero connections") } conn := newLBConnection("LeastRequestLB", s.Connections) if conn.AllWeightsEqual() { return newUnweightedLeastRequest(conn) } return newWeightedLeastRequest(conn, s.ActiveRequestBias) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Nov 14 20:23:34 UTC 2022 - 3.4K bytes - Viewed (0)