vendor: upgrade gRPC v1.13.0

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee
2018-06-21 13:46:40 -07:00
parent 7648841bad
commit c65fd7d7ef
33 changed files with 767 additions and 2132 deletions

View File

@ -24,7 +24,6 @@ import (
"encoding/json"
"errors"
"fmt"
"math/rand"
"net"
"os"
"strconv"
@ -34,6 +33,7 @@ import (
"golang.org/x/net/context"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/internal/grpcrand"
"google.golang.org/grpc/resolver"
)
@ -52,7 +52,6 @@ const (
var (
errMissingAddr = errors.New("missing address")
randomGen = rand.New(rand.NewSource(time.Now().UnixNano()))
)
// NewBuilder creates a dnsBuilder which is used to factory DNS resolvers.
@ -67,6 +66,9 @@ type dnsBuilder struct {
// Build creates and starts a DNS resolver that watches the name resolution of the target.
func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOption) (resolver.Resolver, error) {
if target.Authority != "" {
return nil, fmt.Errorf("Default DNS resolver does not support custom DNS server")
}
host, port, err := parseTarget(target.Endpoint)
if err != nil {
return nil, err
@ -346,7 +348,7 @@ func chosenByPercentage(a *int) bool {
if a == nil {
return true
}
return randomGen.Intn(100)+1 <= *a
return grpcrand.Intn(100)+1 <= *a
}
func canaryingSC(js string) string {