add p2c peak ewma load balancer

This commit is contained in:
kevin
2020-08-06 20:55:38 +08:00
parent c7544d0e60
commit 63583d4744
24 changed files with 304 additions and 282 deletions

View File

@@ -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{