func NewUnicastNamingPicker(r naming.Resolver) Picker {
	return &unicastNamingPicker{
		resolver: r,
		addrs:    list.New(),
	}
}
NewUnicastNamingPicker creates a Picker to pick addresses from a name resolver
to connect.
package grpc
import (
	"container/list"
	"fmt"
	"sync"
	"golang.org/x/net/context"
	"google.golang.org/grpc/grpclog"
	"google.golang.org/grpc/naming"
	"google.golang.org/grpc/transport"
)
type Picker interface {
	Init(cc *ClientConn) error
	Pick(ctx context.Context) (transport.ClientTransport, error)
	PickAddr() (string, error)
	State() (ConnectivityState, error)
	WaitForStateChange(ctx context.Context, sourceState ConnectivityState) (ConnectivityState, error)
	Close() error
}
type unicastPicker struct {
	target string
	conn   *Conn
}
func (p *unicastPicker) Init(cc *ClientConn) error {
	c, err := NewConn(cc)
	if err != nil {
		return err
	}
	p.conn = c
	return nil
}
func (p *unicastPicker) Pick(ctx context.Context) (transport.ClientTransport, error) {
	return p.conn.Wait(ctx)
}
func (p *unicastPicker) PickAddr() (string, error) {
	return p.target, nil
}
func (p *unicastPicker) State() (ConnectivityState, error) {
	return p.conn.State(), nil
}
func (p *unicastPicker) WaitForStateChange(ctx context.Context, sourceState ConnectivityState) (ConnectivityState, error) {
	return p.conn.WaitForStateChange(ctx, sourceState)
}
func (p *unicastPicker) Close() error {
	if p.conn != nil {
		return p.conn.Close()
	}
	return nil
}
type unicastNamingPicker struct {
	cc       *ClientConn
	resolver naming.Resolver
	watcher  naming.Watcher
	mu       sync.Mutex
	addrs *list.List
	pickedAddr *list.Element
	conn       *Conn
}