add roundrobin

master
kevin 4 years ago
parent 1670f6cfc3
commit f498e76def

@ -1,8 +1,11 @@
package balancer
import (
"context"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/balancer/base"
"google.golang.org/grpc/resolver"
)
const (
@ -20,6 +23,14 @@ func newBuilder() balancer.Builder {
return base.NewBalancerBuilder(Name, new(roundRobinPickerBuilder))
}
func (b *roundRobinPickerBuilder) Build(info base.PickerBuildInfo) balancer.Picker {
func (b *roundRobinPickerBuilder) Build(readySCs map[resolver.Address]balancer.SubConn) balancer.Picker {
panic("implement me")
}
type roundRobinPicker struct {
}
func (p *roundRobinPicker) Pick(ctx context.Context, info balancer.PickInfo) (
conn balancer.SubConn, done func(balancer.DoneInfo), err error) {
panic("implement me")
}

Loading…
Cancel
Save