Commit Graph

51 Commits

Author SHA1 Message Date
Joshua Humphries 3cbbe2947f
reflection: don't serialize placeholders (#6771) 2023-11-14 12:13:44 -08:00
Doug Fawley fbff2abb0f
*: update `interface{}` to `any` and `go.mod` version to `go 1.19` (#6544) 2023-08-14 09:04:46 -07:00
Easwar Swaminathan 789cf4e394
reflection: rename proto imports for disambiguation in import script (#6411) 2023-06-26 11:23:39 -07:00
Joshua Humphries 642dd63a85
reflection: expose both v1 and v1alpha reflection services (#6329) 2023-06-12 17:21:44 -04:00
Easwar Swaminathan e0a9f1112a
reflection: split grpc and pb imports (#5810) 2022-11-22 10:40:31 -08:00
Easwar Swaminathan 42cadc171d
test: cleanup balancer switching tests (#5271) 2022-03-30 12:58:41 -07:00
Joshua Humphries 18564ff61d
reflection: improve server implementation (#5197) 2022-02-18 13:13:23 -08:00
Eric Butler ebc30b8fc3
reflection: use protobuf/reflect instead of go reflection, fix dynamic messages (#5180) 2022-02-15 11:01:42 -08:00
赵延 c44f627fd1
cleanup: replace grpc.WithInsecure with insecure.NewCredentials (#5177) 2022-02-09 11:17:46 -08:00
Gaurav Gahlot d7a7a304ff
testing: Avoid using context.Background (#3949) 2020-11-05 09:25:17 -08:00
Doug Fawley 02cd07d9bb
cmd/protoc-gen-go-grpc: revert to interface-based service registration (#3911) 2020-09-29 15:17:06 -07:00
Doug Fawley ff9dd65c90
protoc-gen-go-grpc: generate interfaces optionally; remove NewFooService (#3876) 2020-09-16 10:15:56 -07:00
Garrett Gutierrez 52029da148
service reflection: include transitive closure for a file (#3851) 2020-09-09 15:37:11 -07:00
Doug Fawley 44d73dff99
cmd/protoc-gen-go-grpc: rework service registration (#3828) 2020-08-25 09:28:01 -07:00
Damien Neil 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
Garrett Gutierrez 132187f04c
Modified tests to use tlogger. (#3343)
* Modified tests to use tlogger.

* Fail on errors, with error expectations.

* Added expects and MixedCapsed grpclb_config tests

* Moved tlogger to grpctest, moved leakcheck tester to grpctest.go

* Added ExpectErrorN()

* Removed redundant leak checks

* Fixed new test

* Made tlogger globals into tlogger methods

* ErrorsLeft -> EndTest

* Removed some redundant lines

* Fixed error in test and empty map in EndTest
2020-02-06 13:03:20 -08:00
Doug Fawley df162eae76
test: embed Unimplemented___Server in every service (#3076) 2019-10-04 13:22:31 -07:00
Can Guler 29a7ac4deb
client: deprecates FailFast & replaces its use by WaitForReady. 2018-12-13 15:15:11 -08:00
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
Joshua Humphries 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
Menghan Li 8233e124e4 Add new Resolver and Balancer APIs (gRFC L9) (#1408)
- Add package balancer and resolver.
 - Change ClientConn internals to new APIs and adds a wrapper for v1 balancer.
2017-08-31 10:59:09 -07:00
dfawley 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
Menghan Li 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
Jan Tattermusch ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
Menghan Li a7fee9febf Use proto.Equal for equalities on Go proto messages (#1204) 2017-04-27 10:19:45 -07:00
Josh Humphries ba8cd6e3e6 fix FileContainingExtension in server reflection 2017-02-09 21:12:29 -05:00
Gyu-Ho Lee 05aaecb59d reflection: check ServerReflectionInfo error 2016-10-28 22:37:37 -07:00
Menghan Li a518fa911d Split methods and streams in service info 2016-07-11 12:09:05 -07:00
Menghan Li 26d2db5487 Add server.GetServiceInfo().
To replace server.ServiceMetadata() and server.AllServiceNames().
2016-06-27 12:01:05 -07:00
Menghan Li 439f11e63d Minor changes
Add copyright
Return proto.Marshal(fd)
Comments
2016-06-27 12:01:05 -07:00
Menghan Li 69c7425a21 Change server.ServiceMetadata to take service name and method name.
And some minor changes.
2016-06-27 12:01:05 -07:00
Menghan Li 1302eb9c41 Minor fixes 2016-06-27 12:01:05 -07:00
Menghan Li cb12010c86 Remove return value idxs []int from fileDescForType() 2016-06-27 12:01:05 -07:00
Menghan Li 99966b0e14 Remove t.Logf 2016-06-27 12:01:05 -07:00
Menghan Li 965636a9b1 Minor changes, comments and test error message 2016-06-27 12:01:05 -07:00
Menghan Li ffd3d5874a Add test for testListServices 2016-06-27 12:01:05 -07:00
Menghan Li ab04d8e500 Add service symbol checking to testFileContainingSymbol 2016-06-27 12:01:05 -07:00
Menghan Li c26f2fb8f2 Remove TestFileDescWireFormatByFilename 2016-06-27 12:01:05 -07:00
Menghan Li 5f5c109f1d Add TestFileDescForType TestFileDescContainingExtension 2016-06-27 12:01:05 -07:00
Menghan Li 864c571f44 Remove mutex and cache 2016-06-27 12:01:05 -07:00
Menghan Li a5a4628ee4 Remove unused functions 2016-06-27 12:01:05 -07:00
Menghan Li 6bda8ed552 Add checking response in reflection end2end tests 2016-06-27 12:01:05 -07:00
Menghan Li c41121a259 Remove filenameToDescMap, replace with proto.FileDescriptor() 2016-06-27 12:01:05 -07:00
Menghan Li ae32a64fc3 Add end2end reflection tests frame, not checking response 2016-06-27 12:01:05 -07:00
Menghan Li 273b7164b3 Change package name and add InstallOnServer() 2016-06-27 12:01:05 -07:00
Menghan Li ffca1d2bce Add fileDescWireFormatByFilename, and handle file_by_filename 2016-06-27 12:01:05 -07:00
Menghan Li 8c8bcdd402 Add allExtensionNumbersForType 2016-06-27 12:01:05 -07:00
Menghan Li 196c123058 Add fileDescContainingExtension 2016-06-27 12:01:05 -07:00
Menghan Li dd2c45bc03 Add filenameForType 2016-06-27 12:01:05 -07:00
Menghan Li 36cbb03cfe Add typeForName nameForType nameForPointer 2016-06-27 12:01:05 -07:00