package picker
import "github.com/coreos/etcd/clientv3/balancer/picker"
Package picker defines/implements client balancer picker policy.
Index ¶
Types ¶
type Config ¶
type Config struct { // Policy specifies etcd clientv3's built in balancer policy. Policy Policy // Logger defines picker logging object. Logger *zap.Logger // SubConnToResolverAddress maps each gRPC sub-connection to an address. // Basically, it is a list of addresses that the Picker can pick from. SubConnToResolverAddress map[balancer.SubConn]resolver.Address }
Config defines picker configuration.
type Picker ¶
Picker defines balancer Picker methods.
func New ¶
New creates a new Picker.
func NewErr ¶
NewErr returns a picker that always returns err on "Pick".
type Policy ¶
type Policy uint8
Policy defines balancer picker policy.
const ( // Error is error picker policy. Error Policy = iota // RoundrobinBalanced balances loads over multiple endpoints // and implements failover in roundrobin fashion. RoundrobinBalanced // Custom defines custom balancer picker. // TODO: custom picker is not supported yet. Custom )
func (Policy) String ¶
Source Files ¶
doc.go err.go picker.go roundrobin_balanced.go
- Version
- v3.3.17+incompatible
- Published
- Oct 11, 2019
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 46 minutes ago –
Tools for package owners.