add p2c peak ewma load balancer
This commit is contained in:
@@ -28,12 +28,7 @@ func main() {
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
conn, ok := client.Next()
|
||||
if !ok {
|
||||
time.Sleep(time.Second)
|
||||
break
|
||||
}
|
||||
|
||||
conn := client.Conn()
|
||||
greet := unary.NewGreeterClient(conn)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
|
||||
resp, err := greet.Greet(ctx, &unary.Request{
|
||||
|
||||
Reference in New Issue
Block a user