diff --git a/balancer/grpclb/grpclb_remote_balancer.go b/balancer/grpclb/grpclb_remote_balancer.go index fb4c117b5c15..b95926650052 100644 --- a/balancer/grpclb/grpclb_remote_balancer.go +++ b/balancer/grpclb/grpclb_remote_balancer.go @@ -29,10 +29,10 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/balancer" lbpb "google.golang.org/grpc/balancer/grpclb/grpc_lb_v1" - "google.golang.org/grpc/channelz" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" + "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/metadata" "google.golang.org/grpc/resolver" ) diff --git a/channelz/regenerate.sh b/channelz/service/regenerate.sh similarity index 91% rename from channelz/regenerate.sh rename to channelz/service/regenerate.sh index e749efa1e134..9c255b12cab1 100755 --- a/channelz/regenerate.sh +++ b/channelz/service/regenerate.sh @@ -28,6 +28,6 @@ curl https://raw.githubusercontent.com/grpc/grpc-proto/master/grpc/channelz/v1/c protoc --go_out=plugins=grpc,paths=source_relative:. -I. grpc/channelz/v1/*.proto popd -rm -f grpc_channelz_v1/*.pb.go -cp "$TMP"/grpc/channelz/v1/*.pb.go grpc_channelz_v1/ +rm -f ../grpc_channelz_v1/*.pb.go +cp "$TMP"/grpc/channelz/v1/*.pb.go ../grpc_channelz_v1/ diff --git a/channelz/service/service.go b/channelz/service/service.go index 9630568890f2..19c016bc7c3a 100644 --- a/channelz/service/service.go +++ b/channelz/service/service.go @@ -16,6 +16,8 @@ * */ +//go:generate ./regenerate.sh + // Package service provides an implementation for channelz service server. package service @@ -26,10 +28,10 @@ import ( wrpb "github.com/golang/protobuf/ptypes/wrappers" "golang.org/x/net/context" "google.golang.org/grpc" - "google.golang.org/grpc/channelz" channelzgrpc "google.golang.org/grpc/channelz/grpc_channelz_v1" channelzpb "google.golang.org/grpc/channelz/grpc_channelz_v1" "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/internal/channelz" ) // RegisterChannelzServiceToServer registers the channelz service to the given server. diff --git a/channelz/service/service_test.go b/channelz/service/service_test.go index 4d3973c13df4..398cd6c97a07 100644 --- a/channelz/service/service_test.go +++ b/channelz/service/service_test.go @@ -27,9 +27,9 @@ import ( "github.com/golang/protobuf/ptypes" "golang.org/x/net/context" - "google.golang.org/grpc/channelz" channelzpb "google.golang.org/grpc/channelz/grpc_channelz_v1" "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/internal/channelz" ) func init() { diff --git a/clientconn.go b/clientconn.go index afb5fa6854fe..84ba9e5ad72b 100644 --- a/clientconn.go +++ b/clientconn.go @@ -32,13 +32,13 @@ import ( "golang.org/x/net/trace" "google.golang.org/grpc/balancer" _ "google.golang.org/grpc/balancer/roundrobin" // To register roundrobin. - "google.golang.org/grpc/channelz" "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" "google.golang.org/grpc/internal/backoff" + "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/resolver" _ "google.golang.org/grpc/resolver/dns" // To register dns resolver. diff --git a/channelz/funcs.go b/internal/channelz/funcs.go similarity index 99% rename from channelz/funcs.go rename to internal/channelz/funcs.go index be5d6de60332..586a0336b473 100644 --- a/channelz/funcs.go +++ b/internal/channelz/funcs.go @@ -16,8 +16,6 @@ * */ -//go:generate ./regenerate.sh - // Package channelz defines APIs for enabling channelz service, entry // registration/deletion, and accessing channelz data. It also defines channelz // metric struct formats. diff --git a/channelz/types.go b/internal/channelz/types.go similarity index 100% rename from channelz/types.go rename to internal/channelz/types.go diff --git a/picker_wrapper.go b/picker_wrapper.go index 654a5c0ee1cc..019e658004eb 100644 --- a/picker_wrapper.go +++ b/picker_wrapper.go @@ -25,9 +25,9 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc/balancer" - "google.golang.org/grpc/channelz" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/metadata" "google.golang.org/grpc/resolver" "google.golang.org/grpc/status" diff --git a/server.go b/server.go index c76bb535fa59..014c72b3f283 100644 --- a/server.go +++ b/server.go @@ -38,13 +38,13 @@ import ( "golang.org/x/net/http2" "golang.org/x/net/trace" - "google.golang.org/grpc/channelz" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/encoding" "google.golang.org/grpc/encoding/proto" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" + "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" "google.golang.org/grpc/stats" diff --git a/stream.go b/stream.go index fac6b3886471..152d9eccd62d 100644 --- a/stream.go +++ b/stream.go @@ -27,9 +27,9 @@ import ( "golang.org/x/net/context" "golang.org/x/net/trace" "google.golang.org/grpc/balancer" - "google.golang.org/grpc/channelz" "google.golang.org/grpc/codes" "google.golang.org/grpc/encoding" + "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/metadata" "google.golang.org/grpc/stats" "google.golang.org/grpc/status" diff --git a/test/channelz_test.go b/test/channelz_test.go index 3ab72b053b67..eaa657c4b6a0 100644 --- a/test/channelz_test.go +++ b/test/channelz_test.go @@ -29,8 +29,8 @@ import ( "golang.org/x/net/http2" "google.golang.org/grpc" _ "google.golang.org/grpc/balancer/grpclb" - "google.golang.org/grpc/channelz" "google.golang.org/grpc/codes" + "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/leakcheck" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/resolver" diff --git a/transport/http2_client.go b/transport/http2_client.go index fab25335c9dc..8dc7e3573823 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -31,9 +31,9 @@ import ( "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" - "google.golang.org/grpc/channelz" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" diff --git a/transport/http2_server.go b/transport/http2_server.go index b30c85b3034e..19acedb2b020 100644 --- a/transport/http2_server.go +++ b/transport/http2_server.go @@ -35,10 +35,10 @@ import ( "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" - "google.golang.org/grpc/channelz" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata"