Commit Graph

64 Commits

Author SHA1 Message Date
RedHawker 182e9df160
Grab comment from proto file, similar to protoc-gen-go (#5540) 2022-09-06 12:35:40 -07:00
Thomas Hallgren 5b3768235a
Let helloworld example listen to all hosts (#5089)
This commit changes the address that the helloworld greeter_server is
listening to from "localhost:<port>" to just ":<port>", thus enabling
the server to be used in setups where the request stem from another
host.

Signed-off-by: Thomas Hallgren <thomas@tada.se>
2022-01-24 15:38:04 -08:00
Tiratom 0145b50cdc
use insecure.NewCredentials() instead of grpc.WithInsecure (#5087) 2022-01-12 14:19:03 -05:00
Doug Fawley c285fc70e0
cmd/protoc-gen-go-grpc: update version for release (#5070) 2021-12-20 15:40:38 -08:00
Hrishi Hiraskar 467630fc24
examples: remove usage of WithBlock in examples (#4858) 2021-11-01 11:06:39 -07:00
dkkb 194dcc921a
example: improve hello world server with starting msg (#4468) 2021-05-26 11:17:27 -07:00
Aliaksandr Mianzhynski d6abfb4598
cmd/protoc-gen-go-grpc: add protoc and protoc-gen-go-grpc versions to top comment (#4313) 2021-04-09 16:30:59 -07:00
Doug Fawley 938f6e2f75
cmd/protoc-gen-go-grpc: add gRPC-Go version comment and update release version (#4152) 2021-01-14 14:28:25 -08:00
Edmond 8f3cc6cc26
protoc-gen-go-grpc: export grpc.ServiceDesc (#4035) 2020-11-23 14:56:57 -08:00
Timothy Gu 20636e76a9
protobuf: update protoc to latest version (#4038)
Presently, protoc 3.3.0 (released in 2017) is still being used. This
commit updates the vet.sh script as well as existing generated files to
use protoc 3.14.0 instead.

The only concrete change this brings is updated import paths of
Timestamp and Duration types. However, in practice this is a no-op,
since the types themselves are already aliased to the new import path:

- https://pkg.go.dev/github.com/golang/protobuf@v1.4.3/ptypes/duration#Duration
- https://pkg.go.dev/github.com/golang/protobuf@v1.4.3/ptypes/timestamp#Timestamp
2020-11-16 16:59:46 -08:00
Doug Fawley 4e8458e5c6
protobuf: update all generated code to google.golang.org/protobuf (#3932) 2020-10-21 16:05:44 -07:00
Doug Fawley 9519efffeb
cmd/protoc-gen-go-grpc: use grpc.ServiceRegistrar instead of *grpc.Server (#3968) 2020-10-20 13:02:25 -07: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
Doug Fawley d31b671000
cmd/protoc-gen-go-grpc: call interceptor even if handler is unset (#3849) 2020-08-26 16:05:36 -07:00
Doug Fawley 44d73dff99
cmd/protoc-gen-go-grpc: rework service registration (#3828) 2020-08-25 09:28:01 -07:00
Menghan Li d6c4e49aab
internal: delete mock from examples (#3766) 2020-07-29 13:03:27 -07:00
Doug Fawley ad51f572fd
protoc-gen-go-grpc: add requirement of embedding UnimplementedServer in services (#3657) 2020-06-04 10:56:13 -07:00
Damien Neil f818fd2a02
all: regenerate .pb.go files using cmd/protoc-gen-go-grpc (#3646)
Change regenerate.sh to use cmd/protoc-gen-go-grpc and rerun it.
This splits the gRPC service definitions into separate files, but
otherwise has no changes.
2020-05-28 13:52:49 -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
Menghan Li c7079afb44
lint: fail on missing package comment (#3524)
golint does check for missing package comment, but with low confidence.
golint checks each file, and complains on every file missing package comment, even though another file in the same package has the comment.

This PR adds a golint check with low min_confidence, and filters out false-positives.
2020-04-15 09:59:17 -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 b88d2d7465
protobuf: update protoc-gen-go version and generated code (#3345) 2020-01-30 10:23:21 -08:00
Michael Le 8988da6e70 examples: add examples regression test script (#3118) 2019-10-31 13:11:53 -07:00
Menghan Li 5367efb805
cleanup: no x/net/context (#3120)
Manual change + mockgen
2019-10-29 13:06:26 -07:00
Michael Le b53233ce4c examples: add regression test script to hello world example (#3092) 2019-10-21 13:00:46 -07:00
Doug Fawley 50c4579fc2
examples: add Unimplemented___Server to all example servers (#3071) 2019-10-04 10:54:09 -07:00
Doug Fawley e2cfd1c28f
internal: update proto library version (#3025)
Also, two fixes:

- Fix long-standing `.travis.yml` bug where `VET_SKIP_PROTO` was not `export`ed (so not seen by `vet.sh`).
- Update `vet.sh` to work with new `goimports -l` that does not print a `:` after filenames.
2019-09-17 13:49:26 -07:00
Michael Le 0574097d67 example: use proto message Get methods in helloworld (#2990) 2019-08-22 13:56:23 -07:00
Zuhayr Elahi b86a9dbd22 documentation: Adds package level comments (#2612)
* ADDED package level comments for: benchmark/, examples/helloworld/

* UPDATED code to run gofmt

* FIXED linter errors

* FIXED spelling error

* FIXED documentation based on feedback

* FIXED comment to add pointer to another file

* ADDED reference to start server

* ADDED fix to include command to start server
2019-02-21 13:05:00 -08:00
Menghan Li 6086f8d68f
examples: reflection (#2594) 2019-01-25 15:35:01 -08:00
Ning Xie 3961168004 enhance log for hello world SayHello (#2538)
This PR adds a log to `SayHello`. This makes server logic more clear.
2018-12-27 12:40:13 -08:00
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
Menghan Li 39a411827d
internal: Update proto generated code (#2133) 2018-06-08 17:54:26 -07:00
Menghan Li f669235193
internal: update proto generated code (#2093) 2018-05-21 09:59:26 -07:00
lyuxuan a36eb4675a
regenerate *.pb.go files due to proto-gen-go update (#2070) 2018-05-11 18:57:54 -07:00
Menghan Li e538e04cad proto: update generated code (#2039) 2018-05-01 12:53:20 -07:00
Menghan Li f0a1202acd examples: Replace context.Background with context.WithTimeout (#1877) 2018-02-28 15:01:36 -08:00
Menghan Li a68137c927 Revert "Added localhost to net.Listen() calls to avoid macOS firewall dialog." (#1541)
This reverts commit c67cd636f9.
2017-09-27 00:01:17 -07:00
Hein Meling c67cd636f9 Added localhost to net.Listen() calls to avoid macOS firewall dialog. (#1539) 2017-09-26 10:19:45 -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
田欧 a94a7ac054 add license for some files (#1296) 2017-06-12 18:10:06 -07:00
Jan Tattermusch ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
dfawley 68a5d50f45 Fix go buildable source file problem (#1213) 2017-05-02 15:55:05 -07:00
Mahak Mukhi 5ebdd304ba lint update and test fix 2017-03-08 11:35:54 -08:00
Mahak Mukhi 6a68fd8584 post review updates 2016-12-15 14:07:52 -08:00
Mahak Mukhi 9cc4fd4cca Example code on how to mock gRPC services 2016-12-13 13:06:25 -08:00
Menghan Li cc3363f26e Merge pull request #937 from menghanl/reflection_tutorial
Add server-reflection-tutorial.md
2016-11-29 17:57:20 -08:00
Mahak Mukhi 883bfc7bc8 pb.go file update 2016-10-28 12:37:56 -07:00
Mak Mukhi 727a60e4d1 update server reflection code to comply with the change to the grpc generator 2016-10-21 18:06:55 -07:00