Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reflection: expose both v1 and v1alpha reflection services #6329

Merged
merged 3 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
address review feedback
  • Loading branch information
jhump committed Jun 10, 2023
commit 45b5a543be1eeefd35b94f7ab19d3560d570b9d2
2 changes: 1 addition & 1 deletion reflection/adapt.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright 2016 gRPC authors.
* Copyright 2023 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
10 changes: 1 addition & 9 deletions reflection/serverreflection.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,12 @@ func Register(s GRPCServer) {

// RegisterV1 registers only the v1 version of the server reflection service
// on the given gRPC server. Many clients may only support v1alpha so most
// users should use Register instead.
// users should use Register instead, at least until clients have upgraded.
func RegisterV1(s GRPCServer) {
svr := NewServerV1(ServerOptions{Services: s})
v1grpc.RegisterServerReflectionServer(s, svr)
}

// RegisterV1Alpha registers only the v1alpha version of the server reflection
// service. Some clients may prefer v1 or only support v1 exclusively, so most
// users should use Register instead.
func RegisterV1Alpha(s GRPCServer) {
svr := NewServerV1(ServerOptions{Services: s})
v1alphagrpc.RegisterServerReflectionServer(s, asV1Alpha(svr))
}

// ServiceInfoProvider is an interface used to retrieve metadata about the
// services to expose.
//
Expand Down