NewErrPickerV2 is temporarily defined for backward compatibility reasons.
Deprecated: use NewErrPicker instead.
var NewErrPickerV2 = NewErrPicker
func NewBalancerBuilder(name string, pb PickerBuilder, config Config) balancer.Builder
NewBalancerBuilder returns a base balancer builder configured by the provided config.
func NewErrPicker(err error) balancer.Picker
NewErrPicker returns a Picker that always returns err on Pick().
Config contains the config info about the base balancer builder.
type Config struct { // HealthCheck indicates whether health checking should be enabled for this specific balancer. HealthCheck bool }
PickerBuildInfo contains information needed by the picker builder to construct a picker.
type PickerBuildInfo struct { // ReadySCs is a map from all ready SubConns to the Addresses used to // create them. ReadySCs map[balancer.SubConn]SubConnInfo }
PickerBuilder creates balancer.Picker.
type PickerBuilder interface { // Build returns a picker that will be used by gRPC to pick a SubConn. Build(info PickerBuildInfo) balancer.Picker }
SubConnInfo contains information about a SubConn created by the base balancer.
type SubConnInfo struct { Address resolver.Address // the address used to create this SubConn }