44 Commits

Author SHA1 Message Date
145f12a95b reflection: accept interface instead of grpc.Server struct in Register() (#4340) 2021-04-27 13:15:08 -07:00
52029da148 service reflection: include transitive closure for a file (#3851) 2020-09-09 15:37:11 -07:00
ad51f572fd protoc-gen-go-grpc: add requirement of embedding UnimplementedServer in services (#3657) 2020-06-04 10:56:13 -07:00
15653fec60 all: refactor .pb.go generation (#3451)
Replace various //go:generate lines and regenerate.sh scripts with a
single, top-level regenerate.sh that regenerates all .pb.go files.

Placing generation in a single script ensures that all files are
generated with similar parameters. The new regenerate.sh uses the
protoc-gen-go version defined in test/tools/go.mod and automatically
handles new .proto files as they are added.

Do some minor refactoring on .proto files: Every file now has a
go_package option (which will be required by a future version of the
code generator), and file imports are all relative to the repository
root.
2020-04-24 08:54:03 -07:00
dfbefc6795 service reflection can lookup enum, enum val, oneof, and field symbols (#1910)
* service reflection can lookup enum, enum val, oneof, and field symbols; cache descriptors

* address feedback: don't use mutex, remove unnecessary conditional, make fileDescContainingExtension a func instead of a method
2018-03-21 16:49:57 -07:00
865013bc17 *: replace deprecated grpc.Errorf calls with status.Errorf (#1651) 2017-11-06 10:24:20 -08:00
25b4a426b4 go-generate pb.go files and check in Travis to make sure they don't change (#1426) 2017-08-17 16:00:51 -07:00
1d797552ae Add support for grpc.SupportPackageIsVersion3 back (#1331)
* Support byte slice file descriptor as metadata and add SupportPackageIsVersion3 back

* add v3 test, generate testv3.pb.go with old codegen
2017-06-22 13:56:59 -07:00
ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
ba8cd6e3e6 fix FileContainingExtension in server reflection 2017-02-09 21:12:29 -05:00
dd61a2fa33 fix golint 2016-11-15 11:25:52 -08:00
727a60e4d1 update server reflection code to comply with the change to the grpc generator 2016-10-21 18:06:55 -07:00
ac90a026b6 *: go vet 2016-07-27 23:39:19 -04:00
42a2879989 Modify comments 2016-07-11 16:25:52 -07:00
bc8885608f Merge unary RPC info and streaming RPC info 2016-07-11 13:09:50 -07:00
0ea9f970c0 Add StreamInfo for streaming types 2016-07-11 12:09:05 -07:00
a518fa911d Split methods and streams in service info 2016-07-11 12:09:05 -07:00
a6bacfe42c Fix go vet 2016-06-29 13:36:10 -07:00
e297a2401a Add import comments to package reflection 2016-06-28 17:46:18 -07:00
26d2db5487 Add server.GetServiceInfo().
To replace server.ServiceMetadata() and server.AllServiceNames().
2016-06-27 12:01:05 -07:00
439f11e63d Minor changes
Add copyright
Return proto.Marshal(fd)
Comments
2016-06-27 12:01:05 -07:00
69c7425a21 Change server.ServiceMetadata to take service name and method name.
And some minor changes.
2016-06-27 12:01:05 -07:00
1302eb9c41 Minor fixes 2016-06-27 12:01:05 -07:00
451a2e416b Minor change in allExtensionNumbersForType(), add TestAllServiceNames() 2016-06-27 12:01:05 -07:00
cb12010c86 Remove return value idxs []int from fileDescForType() 2016-06-27 12:01:05 -07:00
965636a9b1 Minor changes, comments and test error message 2016-06-27 12:01:05 -07:00
531771bfae Implement ServerReflectionRequest_ListServices 2016-06-27 12:01:05 -07:00
864c571f44 Remove mutex and cache 2016-06-27 12:01:05 -07:00
a5a4628ee4 Remove unused functions 2016-06-27 12:01:05 -07:00
c41121a259 Remove filenameToDescMap, replace with proto.FileDescriptor() 2016-06-27 12:01:05 -07:00
5d7d0ce3d3 Add returning unimplemented error to list_services 2016-06-27 12:01:05 -07:00
f28f4aa4bd Add allExtensionNumbersForTypeName and handle all_extension_numbers_response 2016-06-27 12:01:05 -07:00
54fd6c1ea3 Create response at beginning and populate it with corresponding bytes 2016-06-27 12:01:05 -07:00
d578ccfa12 Add fileDescWireFormatContainingExtension and handle file_containing_extension 2016-06-27 12:01:05 -07:00
36cfaed58e Add fileDescWireFormatContainingSymbol and handle file_containing_symbol 2016-06-27 12:01:05 -07:00
273b7164b3 Change package name and add InstallOnServer() 2016-06-27 12:01:05 -07:00
ffca1d2bce Add fileDescWireFormatByFilename, and handle file_by_filename 2016-06-27 12:01:05 -07:00
43e7db5352 Add ServerReflectionInfo handler, not implemented 2016-06-27 12:01:05 -07:00
1be569e2d5 Make use of cache maps 2016-06-27 12:01:05 -07:00
8c8bcdd402 Add allExtensionNumbersForType 2016-06-27 12:01:05 -07:00
196c123058 Add fileDescContainingExtension 2016-06-27 12:01:05 -07:00
dd2c45bc03 Add filenameForType 2016-06-27 12:01:05 -07:00
36cbb03cfe Add typeForName nameForType nameForPointer 2016-06-27 12:01:05 -07:00
15469fce29 Add fileDescForType, tests to be added 2016-06-27 12:01:05 -07:00