Add comments

pull/15701/head
Chris S. Kim 2 years ago
parent 35f72880ce
commit e8be8e4d55

@ -11,9 +11,8 @@ func init() {
balancer.Register(newCustomPickfirstBuilder())
}
// CustomBalancerName is the name of the modified pick_first balancer.
const CustomBalancerName = "pick_first_custom"
// logger is referenced in pickfirst.go.
// The gRPC library uses the same component name.
var logger = grpclog.Component("balancer")
func newCustomPickfirstBuilder() balancer.Builder {
@ -29,9 +28,10 @@ func (*customPickfirstBuilder) Build(cc balancer.ClientConn, opt balancer.BuildO
}
func (*customPickfirstBuilder) Name() string {
return CustomBalancerName
return "pick_first_custom"
}
// customPickfirstBalancer overrides UpdateClientConnState of pickfirstBalancer.
type customPickfirstBalancer struct {
pickfirstBalancer

@ -1,4 +1,4 @@
// NOTICE: This file is a derivative of grpc's pick_first implementation [1].
// NOTICE: This file is a copy of grpc's pick_first implementation [1].
// It is preserved as-is with the init() removed for easier updating.
//
// [1]: https://github.com/grpc/grpc-go/blob/v1.49.x/pickfirst.go

Loading…
Cancel
Save