picker

package
v3.2.0-rc.1.0...-6143c13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package picker defines/implements client balancer picker policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Picker

type Picker interface {
	balancer.Picker
}

Picker defines balancer Picker methods.

func NewErr

func NewErr(err error) Picker

NewErr returns a picker that always returns err on "Pick".

func NewRoundrobinBalanced

func NewRoundrobinBalanced(
	lg *zap.Logger,
	scs []balancer.SubConn,
	addrToSc map[resolver.Address]balancer.SubConn,
	scToAddr map[balancer.SubConn]resolver.Address,
) Picker

NewRoundrobinBalanced returns a new roundrobin balanced picker.

type Policy

type Policy uint8

Policy defines balancer picker policy.

const (

	// RoundrobinBalanced balance loads over multiple endpoints
	// and implements failover in roundrobin fashion.
	RoundrobinBalanced Policy = iota
)

func (Policy) String

func (p Policy) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL