Move code out of balancer/xds. (#2950)
We will have a root level xds/ directory which will eventually contain all xDS implementation including balancer, resolver, client etc. The new structure looks something like this: grpc/ | +--xds/ | +--internal/ | | | +--balancer/ | | | +--edsbalancer/ | | | +--lrs/ | | | +--orca/ | +--experimental/ Users need to import grpc/xds/experimental package to get all xds functionality, and this will eventually be moved to grpc/xds. Also, moved grpc/balancer/internal/wrr to grpc/internal/wrr.
This commit is contained in:

committed by
GitHub

parent
fde0cae1c4
commit
36ddeccf18
6
vet.sh
6
vet.sh
@ -110,9 +110,9 @@ staticcheck -go 1.9 -checks 'inherit,-ST1015' -ignore '
|
||||
google.golang.org/grpc/balancer.go:SA1019
|
||||
google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go:SA1019
|
||||
google.golang.org/grpc/balancer/roundrobin/roundrobin_test.go:SA1019
|
||||
google.golang.org/grpc/balancer/xds/edsbalancer/balancergroup.go:SA1019
|
||||
google.golang.org/grpc/balancer/xds/xds.go:SA1019
|
||||
google.golang.org/grpc/balancer/xds/xds_client.go:SA1019
|
||||
google.golang.org/grpc/xds/internal/balancer/edsbalancer/balancergroup.go:SA1019
|
||||
google.golang.org/grpc/xds/internal/balancer/xds.go:SA1019
|
||||
google.golang.org/grpc/xds/internal/balancer/xds_client.go:SA1019
|
||||
google.golang.org/grpc/balancer_conn_wrappers.go:SA1019
|
||||
google.golang.org/grpc/balancer_test.go:SA1019
|
||||
google.golang.org/grpc/benchmark/benchmain/main.go:SA1019
|
||||
|
32
xds/experimental/xds_experimental.go
Normal file
32
xds/experimental/xds_experimental.go
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2019 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
// Package experimental contains xds implementation, still in experimental
|
||||
// state. Users only need to import this package to get all xds functionality.
|
||||
// Things are expected to change fast until we get to a stable state, at
|
||||
// which point, all this will be moved to the xds package.
|
||||
package experimental
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc/balancer"
|
||||
xdsbalancer "google.golang.org/grpc/xds/internal/balancer"
|
||||
)
|
||||
|
||||
func init() {
|
||||
balancer.Register(xdsbalancer.NewBalancerBuilder())
|
||||
}
|
@ -22,13 +22,13 @@ import (
|
||||
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/balancer/base"
|
||||
"google.golang.org/grpc/balancer/internal/wrr"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
orcapb "google.golang.org/grpc/balancer/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
"google.golang.org/grpc/balancer/xds/lrs"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/internal/wrr"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
"google.golang.org/grpc/xds/internal/balancer/lrs"
|
||||
orcapb "google.golang.org/grpc/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
)
|
||||
|
||||
type pickerState struct {
|
@ -23,10 +23,10 @@ import (
|
||||
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/balancer/roundrobin"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
orcapb "google.golang.org/grpc/balancer/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
orcapb "google.golang.org/grpc/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
)
|
||||
|
||||
var (
|
@ -28,16 +28,16 @@ import (
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/balancer/roundrobin"
|
||||
"google.golang.org/grpc/balancer/weightedroundrobin"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
edspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/eds"
|
||||
endpointpb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/endpoint/endpoint"
|
||||
percentpb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/type/percent"
|
||||
"google.golang.org/grpc/balancer/xds/lrs"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
"google.golang.org/grpc/xds/internal/balancer/lrs"
|
||||
edspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/eds"
|
||||
endpointpb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/endpoint/endpoint"
|
||||
percentpb "google.golang.org/grpc/xds/internal/proto/envoy/type/percent"
|
||||
)
|
||||
|
||||
type localityConfig struct {
|
@ -27,14 +27,14 @@ import (
|
||||
typespb "github.com/golang/protobuf/ptypes/wrappers"
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/balancer/roundrobin"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
addresspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/address"
|
||||
basepb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
edspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/eds"
|
||||
endpointpb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/endpoint/endpoint"
|
||||
percentpb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/type/percent"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
addresspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/address"
|
||||
basepb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
edspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/eds"
|
||||
endpointpb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/endpoint/endpoint"
|
||||
percentpb "google.golang.org/grpc/xds/internal/proto/envoy/type/percent"
|
||||
)
|
||||
|
||||
var (
|
@ -23,9 +23,9 @@ import (
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
)
|
||||
|
||||
var (
|
@ -16,7 +16,7 @@
|
||||
|
||||
package edsbalancer
|
||||
|
||||
import "google.golang.org/grpc/balancer/internal/wrr"
|
||||
import "google.golang.org/grpc/internal/wrr"
|
||||
|
||||
type dropper struct {
|
||||
// Drop rate will be numerator/denominator.
|
@ -20,7 +20,7 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"google.golang.org/grpc/balancer/internal/wrr"
|
||||
"google.golang.org/grpc/internal/wrr"
|
||||
)
|
||||
|
||||
// testWRR is a deterministic WRR implementation.
|
@ -26,13 +26,13 @@ import (
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
structpb "github.com/golang/protobuf/ptypes/struct"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
basepb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
loadreportpb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/endpoint/load_report"
|
||||
lrsgrpc "google.golang.org/grpc/balancer/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
lrspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/internal/backoff"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
basepb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
loadreportpb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/endpoint/load_report"
|
||||
lrsgrpc "google.golang.org/grpc/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
lrspb "google.golang.org/grpc/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
)
|
||||
|
||||
const negativeOneUInt64 = ^uint64(0)
|
@ -33,13 +33,13 @@ import (
|
||||
structpb "github.com/golang/protobuf/ptypes/struct"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
basepb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
loadreportpb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/endpoint/load_report"
|
||||
lrsgrpc "google.golang.org/grpc/balancer/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
lrspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
basepb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
loadreportpb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/endpoint/load_report"
|
||||
lrsgrpc "google.golang.org/grpc/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
lrspb "google.golang.org/grpc/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
)
|
||||
|
||||
const testService = "grpc.service.test"
|
@ -19,10 +19,10 @@ package orca
|
||||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
orcapb "google.golang.org/grpc/balancer/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/internal/balancerload"
|
||||
"google.golang.org/grpc/metadata"
|
||||
orcapb "google.golang.org/grpc/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
)
|
||||
|
||||
const mdKey = "X-Endpoint-Load-Metrics-Bin"
|
@ -22,8 +22,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
orcapb "google.golang.org/grpc/balancer/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
"google.golang.org/grpc/metadata"
|
||||
orcapb "google.golang.org/grpc/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
)
|
||||
|
||||
var (
|
@ -16,9 +16,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// Package xds implements a balancer that communicates with a remote balancer using the Envoy xDS
|
||||
// protocol.
|
||||
package xds
|
||||
// Package balancer contains xds balancer implementation.
|
||||
package balancer
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -30,14 +29,14 @@ import (
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/balancer/xds/edsbalancer"
|
||||
cdspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/cds"
|
||||
edspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/eds"
|
||||
"google.golang.org/grpc/balancer/xds/lrs"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/serviceconfig"
|
||||
"google.golang.org/grpc/xds/internal/balancer/edsbalancer"
|
||||
"google.golang.org/grpc/xds/internal/balancer/lrs"
|
||||
cdspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/cds"
|
||||
edspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/eds"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -55,13 +54,11 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
balancer.Register(newXDSBalancerBuilder())
|
||||
}
|
||||
|
||||
type xdsBalancerBuilder struct{}
|
||||
|
||||
func newXDSBalancerBuilder() balancer.Builder {
|
||||
// NewBalancerBuilder creates a new implementation of the balancer.Builder
|
||||
// interface for the xDS balancer.
|
||||
func NewBalancerBuilder() balancer.Builder {
|
||||
return &xdsBalancerBuilder{}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package xds
|
||||
package balancer
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -28,16 +28,16 @@ import (
|
||||
structpb "github.com/golang/protobuf/ptypes/struct"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
cdspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/cds"
|
||||
basepb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
discoverypb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/discovery"
|
||||
edspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/eds"
|
||||
adsgrpc "google.golang.org/grpc/balancer/xds/internal/proto/envoy/service/discovery/v2/ads"
|
||||
"google.golang.org/grpc/balancer/xds/lrs"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/internal/backoff"
|
||||
"google.golang.org/grpc/internal/channelz"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
"google.golang.org/grpc/xds/internal/balancer/lrs"
|
||||
cdspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/cds"
|
||||
basepb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
discoverypb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/discovery"
|
||||
edspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/eds"
|
||||
adsgrpc "google.golang.org/grpc/xds/internal/proto/envoy/service/discovery/v2/ads"
|
||||
)
|
||||
|
||||
const (
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package xds
|
||||
package balancer
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -33,18 +33,18 @@ import (
|
||||
wrpb "github.com/golang/protobuf/ptypes/wrappers"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
cdspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/cds"
|
||||
addresspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/address"
|
||||
basepb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
discoverypb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/discovery"
|
||||
edspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/eds"
|
||||
endpointpb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/endpoint/endpoint"
|
||||
adsgrpc "google.golang.org/grpc/balancer/xds/internal/proto/envoy/service/discovery/v2/ads"
|
||||
lrsgrpc "google.golang.org/grpc/balancer/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
cdspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/cds"
|
||||
addresspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/address"
|
||||
basepb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
discoverypb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/discovery"
|
||||
edspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/eds"
|
||||
endpointpb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/endpoint/endpoint"
|
||||
adsgrpc "google.golang.org/grpc/xds/internal/proto/envoy/service/discovery/v2/ads"
|
||||
lrsgrpc "google.golang.org/grpc/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
)
|
||||
|
||||
var (
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package xds
|
||||
package balancer
|
||||
|
||||
import (
|
||||
"io"
|
||||
@ -29,13 +29,13 @@ import (
|
||||
structpb "github.com/golang/protobuf/ptypes/struct"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/balancer/xds/internal"
|
||||
basepb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
lrsgrpc "google.golang.org/grpc/balancer/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
lrspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/grpc/xds/internal"
|
||||
basepb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
lrsgrpc "google.golang.org/grpc/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
lrspb "google.golang.org/grpc/xds/internal/proto/envoy/service/load_stats/v2/lrs"
|
||||
)
|
||||
|
||||
type lrsServer struct {
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package xds
|
||||
package balancer
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@ -27,18 +27,19 @@ import (
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/grpc/balancer"
|
||||
discoverypb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/discovery"
|
||||
edspb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/eds"
|
||||
"google.golang.org/grpc/balancer/xds/lrs"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/internal/grpctest"
|
||||
"google.golang.org/grpc/internal/leakcheck"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/xds/internal/balancer/lrs"
|
||||
discoverypb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/discovery"
|
||||
edspb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/eds"
|
||||
)
|
||||
|
||||
var lbABuilder = &balancerABuilder{}
|
||||
|
||||
func init() {
|
||||
balancer.Register(&xdsBalancerBuilder{})
|
||||
balancer.Register(lbABuilder)
|
||||
balancer.Register(&balancerBBuilder{})
|
||||
}
|
@ -20,7 +20,7 @@ package internal
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
basepb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
basepb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
)
|
||||
|
||||
// Locality is xds.Locality without XXX fields, so it can be used as map
|
@ -24,7 +24,7 @@ import (
|
||||
"unicode"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
basepb "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
basepb "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
)
|
||||
|
||||
const ignorePrefix = "XXX_"
|
@ -7,9 +7,9 @@ import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import config_source "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/config_source"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import config_source "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/config_source"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -11,18 +11,18 @@ import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import _struct "github.com/golang/protobuf/ptypes/struct"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
import cert "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/auth/cert"
|
||||
import circuit_breaker "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/cluster/circuit_breaker"
|
||||
import outlier_detection "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/cluster/outlier_detection"
|
||||
import address "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/address"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import config_source "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/config_source"
|
||||
import health_check "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/health_check"
|
||||
import protocol "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/protocol"
|
||||
import discovery "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/discovery"
|
||||
import eds "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/eds"
|
||||
import percent "google.golang.org/grpc/balancer/xds/internal/proto/envoy/type/percent"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import cert "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/auth/cert"
|
||||
import circuit_breaker "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/cluster/circuit_breaker"
|
||||
import outlier_detection "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/cluster/outlier_detection"
|
||||
import address "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/address"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import config_source "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/config_source"
|
||||
import health_check "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/health_check"
|
||||
import protocol "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/protocol"
|
||||
import discovery "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/discovery"
|
||||
import eds "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/eds"
|
||||
import percent "google.golang.org/grpc/xds/internal/proto/envoy/type/percent"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
@ -7,7 +7,7 @@ import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -8,7 +8,7 @@ import fmt "fmt"
|
||||
import math "math"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -7,8 +7,8 @@ import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: envoy/api/v2/core/base.proto
|
||||
|
||||
package core
|
||||
package envoy_api_v2_core
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
@ -9,8 +9,8 @@ import math "math"
|
||||
import any "github.com/golang/protobuf/ptypes/any"
|
||||
import _struct "github.com/golang/protobuf/ptypes/struct"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import percent "google.golang.org/grpc/balancer/xds/internal/proto/envoy/type/percent"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import percent "google.golang.org/grpc/xds/internal/proto/envoy/type/percent"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -8,8 +8,8 @@ import fmt "fmt"
|
||||
import math "math"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import grpc_service "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/grpc_service"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import grpc_service "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/grpc_service"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -10,8 +10,8 @@ import any "github.com/golang/protobuf/ptypes/any"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import empty "github.com/golang/protobuf/ptypes/empty"
|
||||
import _struct "github.com/golang/protobuf/ptypes/struct"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -10,9 +10,9 @@ import any "github.com/golang/protobuf/ptypes/any"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import _struct "github.com/golang/protobuf/ptypes/struct"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import _range "google.golang.org/grpc/balancer/xds/internal/proto/envoy/type/range"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import _range "google.golang.org/grpc/xds/internal/proto/envoy/type/range"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -8,7 +8,7 @@ import fmt "fmt"
|
||||
import math "math"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -8,7 +8,7 @@ import fmt "fmt"
|
||||
import math "math"
|
||||
import any "github.com/golang/protobuf/ptypes/any"
|
||||
import status "google.golang.org/genproto/googleapis/rpc/status"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -9,10 +9,10 @@ import math "math"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
import discovery "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/discovery"
|
||||
import endpoint "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/endpoint/endpoint"
|
||||
import percent "google.golang.org/grpc/balancer/xds/internal/proto/envoy/type/percent"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import discovery "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/discovery"
|
||||
import endpoint "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/endpoint/endpoint"
|
||||
import percent "google.golang.org/grpc/xds/internal/proto/envoy/type/percent"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
@ -7,10 +7,10 @@ import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
import address "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/address"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import health_check "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/health_check"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import address "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/address"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import health_check "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/health_check"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -8,9 +8,9 @@ import fmt "fmt"
|
||||
import math "math"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import _struct "github.com/golang/protobuf/ptypes/struct"
|
||||
import address "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/address"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import address "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/address"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -6,7 +6,7 @@ package v2
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import discovery "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/discovery"
|
||||
import discovery "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/discovery"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
@ -7,9 +7,9 @@ import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import base "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import load_report "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/endpoint/load_report"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import base "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/core/base"
|
||||
import load_report "google.golang.org/grpc/xds/internal/proto/envoy/api/v2/endpoint/load_report"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
@ -6,7 +6,7 @@ package envoy_type
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -6,7 +6,7 @@ package v1
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
@ -7,8 +7,8 @@ import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
import orca_load_report "google.golang.org/grpc/balancer/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
import orca_load_report "google.golang.org/grpc/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
|
||||
import _ "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: validate/validate.proto
|
||||
|
||||
package validate // import "google.golang.org/grpc/balancer/xds/internal/proto/validate"
|
||||
package validate // import "google.golang.org/grpc/xds/internal/proto/validate"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
@ -1,7 +1,7 @@
|
||||
## Generate new pb.go files
|
||||
|
||||
1. Update
|
||||
[DATA_PLANE_API_VERSION](https://github.com/grpc/grpc-go/blob/master/balancer/xds/internal/regenerate_scripts/envoy-proto-gen.sh#L3)
|
||||
[DATA_PLANE_API_VERSION](https://github.com/grpc/grpc-go/blob/master/xds/internal/regenerate_scripts/envoy-proto-gen.sh#L3)
|
||||
to a new commit for
|
||||
[envoyproxy/data-plane-api](https://github.com/envoyproxy/data-plane-api/commits/master).
|
||||
1. Run `./envoy-proto-gen.sh` in __this__ directory (and fingers crossed).
|
@ -27,6 +27,6 @@ cd ../data-plane-api
|
||||
|
||||
git apply ../utils/data-plane-api.patch
|
||||
# proto-gen.sh build all packages required for grpc xds implementation and move
|
||||
# proto generated code to grpc/balancer/xds/internal/proto subdirectory.
|
||||
# proto generated code to grpc/xds/internal/proto subdirectory.
|
||||
../utils/proto-gen.sh
|
||||
|
@ -7,7 +7,7 @@ index c68ccbd..e6cc8cb 100644
|
||||
_GO_PROTO_SUFFIX = "_go_proto"
|
||||
_GO_GRPC_SUFFIX = "_go_grpc"
|
||||
-_GO_IMPORTPATH_PREFIX = "github.com/envoyproxy/data-plane-api/api/"
|
||||
+_GO_IMPORTPATH_PREFIX = "google.golang.org/grpc/balancer/xds/internal/proto/"
|
||||
+_GO_IMPORTPATH_PREFIX = "google.golang.org/grpc/xds/internal/proto/"
|
||||
|
||||
def _Suffix(d, suffix):
|
||||
return d + suffix
|
@ -7,7 +7,7 @@ index 8a3d063..939d997 100644
|
||||
go_proto_library(
|
||||
name = "go_default_library",
|
||||
- importpath = "github.com/envoyproxy/protoc-gen-validate/validate",
|
||||
+ importpath = "google.golang.org/grpc/balancer/xds/internal/proto/validate",
|
||||
+ importpath = "google.golang.org/grpc/xds/internal/proto/validate",
|
||||
proto = ":validate_proto",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
@ -20,7 +20,7 @@ index 864ad86..6165f39 100644
|
||||
package validate;
|
||||
|
||||
-option go_package = "github.com/envoyproxy/protoc-gen-validate/validate";
|
||||
+option go_package = "google.golang.org/grpc/balancer/xds/internal/proto/validate";
|
||||
+option go_package = "google.golang.org/grpc/xds/internal/proto/validate";
|
||||
option java_package = "io.envoyproxy.pgv.validate";
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
Reference in New Issue
Block a user