mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-25 02:08:44 +08:00
26 lines
446 B
Go
26 lines
446 B
Go
package balancer
|
|
|
|
import (
|
|
"google.golang.org/grpc/balancer"
|
|
"google.golang.org/grpc/balancer/base"
|
|
)
|
|
|
|
const (
|
|
Name = "roundrobin"
|
|
)
|
|
|
|
func init() {
|
|
balancer.Register(newBuilder())
|
|
}
|
|
|
|
type roundRobinPickerBuilder struct {
|
|
}
|
|
|
|
func newBuilder() balancer.Builder {
|
|
return base.NewBalancerBuilder(Name, new(roundRobinPickerBuilder))
|
|
}
|
|
|
|
func (b *roundRobinPickerBuilder) Build(info base.PickerBuildInfo) balancer.Picker {
|
|
panic("implement me")
|
|
}
|