transport: implement GoString on Stream (#1167)

So context.String() won't  race when printing %#v.

It is not thread-safe to call context.String() on any context with a
stream value since valueCtx will use %#v to access all of the Stream
fields without holding a lock. Instead, print the Stream's pointer and
method for its GoString.
1 file changed
tree: 9c3ade397638b6fd5895d5c3c36869c11f4ef878
  1. benchmark/
  2. codes/
  3. credentials/
  4. Documentation/
  5. examples/
  6. grpclb/
  7. grpclog/
  8. health/
  9. internal/
  10. interop/
  11. keepalive/
  12. metadata/
  13. naming/
  14. peer/
  15. reflection/
  16. stats/
  17. status/
  18. stress/
  19. tap/
  20. test/
  21. testdata/
  22. transport/
  23. .travis.yml
  24. backoff.go
  25. backoff_test.go
  26. balancer.go
  27. balancer_test.go
  28. call.go
  29. call_test.go
  30. clientconn.go
  31. clientconn_test.go
  32. codegen.sh
  33. CONTRIBUTING.md
  34. coverage.sh
  35. doc.go
  36. interceptor.go
  37. LICENSE
  38. Makefile
  39. PATENTS
  40. README.md
  41. rpc_util.go
  42. rpc_util_test.go
  43. server.go
  44. server_test.go
  45. stream.go
  46. trace.go
README.md

#gRPC-Go

Build Status GoDoc

The Go implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first. For more information see the gRPC Quick Start guide.

Installation

To install this package, you need to install Go and setup your Go workspace on your computer. The simplest way to install the library is to run:

$ go get google.golang.org/grpc

Prerequisites

This requires Go 1.6 or later.

Constraints

The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the list, you need a discussion with gRPC-Go authors and consultants.

Documentation

See API documentation for package and API descriptions and find examples in the examples directory.

Status

GA

FAQ

Compiling error, undefined: grpc.SupportPackageIsVersion

Please update proto package, gRPC package and rebuild the proto files:

  • go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
  • go get -u google.golang.org/grpc
  • protoc --go_out=plugins=grpc:. *.proto