Skip to content

Commit

Permalink
channelz: move APIs to internal except channelz service (#2157)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyuxuan authored Jun 19, 2018
1 parent 3b3ed4f commit b28608a
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion balancer/grpclb/grpclb_remote_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions channelz/regenerate.sh → channelz/service/regenerate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/

4 changes: 3 additions & 1 deletion channelz/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

//go:generate ./regenerate.sh

// Package service provides an implementation for channelz service server.
package service

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion channelz/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions channelz/funcs.go → internal/channelz/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion picker_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/channelz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion transport/http2_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion transport/http2_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b28608a

Please sign in to comment.