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

@@ -4,7 +4,6 @@ import (
"context"
"flag"
"fmt"
"log"
"time"
"zero/core/conf"
@@ -25,11 +24,7 @@ func main() {
for {
select {
case <-ticker.C:
conn, ok := client.Next()
if !ok {
log.Fatal("no server")
}
conn := client.Conn()
greet := unary.NewGreeterClient(conn)
resp, err := greet.Greet(context.Background(), &unary.Request{
Name: "kevin",