fullstorydev / grpchan

Channels for gRPC: custom transports
MIT License
204 stars 23 forks source link

cleanup: deprecate no-longer-needed interface, update context usage #47

Closed jhump closed 3 years ago

jhump commented 3 years ago

This deprecates the Channel interface and the generated New<Service>ChannelClient functions. It also fixes up all usage of context (to stop importing golang.org/x/net/context).

I also re-generated all files using proper pinned version of protoc-gen-go and made some fixes identified by go vet related to failing to call a context's cancel function. Strangely, the versions in the repo had full paths, relative to a GOPATH. Yet the actual go:generate directive would generate files with no directories at all. To prevent accidental issues with registering duplicate files (since test.proto, without a path, seems to generic and easy to have a collision), I tweaked that directive so the file is registered as grpchantesting/test.proto instead.

Finally, there are some changes to the Makefile, to get it inline with recent-ish changes made to the Makefile in other repos (like grpcurl and grpcui).