xds: use different proto import for grpc services (#4285)

This commit is contained in:
Doug Fawley
2021-03-23 13:26:01 -07:00
committed by GitHub
parent b331a48e06
commit 46da49ca60
2 changed files with 4 additions and 2 deletions

View File

@ -26,6 +26,7 @@ import (
"testing"
"time"
v3statusgrpc "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
"github.com/google/uuid"
"google.golang.org/grpc"
@ -105,7 +106,7 @@ func RunChannelz(conn *grpc.ClientConn) error {
// RunCSDS makes a CSDS RPC.
func RunCSDS(conn *grpc.ClientConn) error {
c := v3statuspb.NewClientStatusDiscoveryServiceClient(conn)
c := v3statusgrpc.NewClientStatusDiscoveryServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
defer cancel()
_, err := c.FetchClientStatus(ctx, &v3statuspb.ClientStatusRequest{}, grpc.WaitForReady(true))

View File

@ -32,6 +32,7 @@ import (
v3adminpb "github.com/envoyproxy/go-control-plane/envoy/admin/v3"
v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
v3statusgrpc "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
"github.com/golang/protobuf/proto"
"google.golang.org/grpc/codes"
@ -83,7 +84,7 @@ func NewClientStatusDiscoveryServer() (*ClientStatusDiscoveryServer, error) {
}
// StreamClientStatus implementations interface ClientStatusDiscoveryServiceServer.
func (s *ClientStatusDiscoveryServer) StreamClientStatus(stream v3statuspb.ClientStatusDiscoveryService_StreamClientStatusServer) error {
func (s *ClientStatusDiscoveryServer) StreamClientStatus(stream v3statusgrpc.ClientStatusDiscoveryService_StreamClientStatusServer) error {
for {
req, err := stream.Recv()
if err == io.EOF {