• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H05-Feb-2020-148111

Documentation/H05-Feb-2020-1,208882

attributes/H05-Feb-2020-12051

backoff/H05-Feb-2020-5314

balancer/H05-Feb-2020-6,3224,424

benchmark/H05-Feb-2020-9,0226,972

binarylog/grpc_binarylog_v1/H05-Feb-2020-901708

channelz/H05-Feb-2020-4,7023,810

codes/H05-Feb-2020-347163

connectivity/H05-Feb-2020-7434

credentials/H05-Feb-2020-6,8434,778

encoding/H05-Feb-2020-593340

examples/H05-Feb-2020-8,6326,284

grpclog/H05-Feb-2020-559294

health/H05-Feb-2020-832535

internal/H05-Feb-2020-20,91615,332

interop/H05-Feb-2020-3,4282,779

keepalive/H05-Feb-2020-8620

metadata/H05-Feb-2020-461318

naming/H05-Feb-2020-695507

peer/H05-Feb-2020-5218

profiling/H05-Feb-2020-1,4691,042

reflection/H05-Feb-2020-3,1452,499

resolver/H05-Feb-2020-412128

security/advancedtls/H05-Feb-2020-1,6861,403

serviceconfig/H05-Feb-2020-4211

stats/H05-Feb-2020-2,1541,676

status/H05-Feb-2020-669505

stress/H05-Feb-2020-850664

tap/H05-Feb-2020-528

test/H05-Feb-2020-14,79412,173

testdata/H05-Feb-2020-9363

xds/H05-Feb-2020-13,9829,809

.travis.ymlH A D05-Feb-20201.3 KiB4337

AUTHORSH A D05-Feb-202012 21

CODE-OF-CONDUCT.mdH A D05-Feb-2020138 42

CONTRIBUTING.mdH A D05-Feb-20203 KiB6347

GOVERNANCE.mdH A D05-Feb-2020141 21

LICENSEH A D05-Feb-202011.1 KiB203169

MAINTAINERS.mdH A D05-Feb-20201.3 KiB2824

MakefileH A D05-Feb-20201.2 KiB6448

README.mdH A D05-Feb-20204.1 KiB12290

backoff.goH A D05-Feb-20201.9 KiB5915

balancer.goH A D05-Feb-202011 KiB392268

balancer_conn_wrappers.goH A D05-Feb-20207.5 KiB272200

balancer_conn_wrappers_test.goH A D05-Feb-20204.1 KiB12273

balancer_switching_test.goH A D05-Feb-202016.1 KiB525401

balancer_test.goH A D05-Feb-202024 KiB790657

balancer_v1_wrapper.goH A D05-Feb-20209 KiB335267

call.goH A D05-Feb-20202.4 KiB7536

call_test.goH A D05-Feb-202014.3 KiB490421

clientconn.goH A D05-Feb-202048.1 KiB1,5691,135

clientconn_state_transition_test.goH A D05-Feb-202012.6 KiB510395

clientconn_test.goH A D05-Feb-202035.4 KiB1,2261,030

codec.goH A D05-Feb-20201.6 KiB5116

codec_test.goH A D05-Feb-2020895 3311

codegen.shH A D05-Feb-2020635 182

dialoptions.goH A D05-Feb-202020.7 KiB595301

doc.goH A D05-Feb-2020755 251

go.modH A D05-Feb-2020562 1714

go.sumH A D05-Feb-20205.2 KiB5453

grpc_test.goH A D05-Feb-20201.3 KiB6032

install_gae.shH A D05-Feb-2020236 74

interceptor.goH A D05-Feb-20203.9 KiB7820

picker_wrapper.goH A D05-Feb-20206.3 KiB230162

picker_wrapper_test.goH A D05-Feb-20204.8 KiB156120

pickfirst.goH A D05-Feb-20204.8 KiB160118

pickfirst_test.goH A D05-Feb-202011.7 KiB353280

preloader.goH A D05-Feb-20201.8 KiB6534

proxy.goH A D05-Feb-20204 KiB153108

proxy_test.goH A D05-Feb-20205.6 KiB234185

resolver_conn_wrapper.goH A D05-Feb-20207.5 KiB264203

resolver_conn_wrapper_test.goH A D05-Feb-202010 KiB270197

rpc_util.goH A D05-Feb-202026.6 KiB888553

rpc_util_test.goH A D05-Feb-20208.2 KiB290227

server.goH A D05-Feb-202044.6 KiB1,5491,172

server_test.goH A D05-Feb-20203.1 KiB13395

service_config.goH A D05-Feb-202013.7 KiB435284

service_config_test.goH A D05-Feb-20209.1 KiB436392

stream.goH A D05-Feb-202044.8 KiB1,5301,103

trace.goH A D05-Feb-20202.9 KiB12478

trace_test.goH A D05-Feb-20201.2 KiB5129

version.goH A D05-Feb-2020683 232

vet.shH A D05-Feb-20204.5 KiB160115

README.md

1# gRPC-Go
2
3[![Build Status](https://travis-ci.org/grpc/grpc-go.svg)](https://travis-ci.org/grpc/grpc-go)
4[![GoDoc](https://godoc.org/google.golang.org/grpc?status.svg)](https://godoc.org/google.golang.org/grpc)
5[![GoReportCard](https://goreportcard.com/badge/grpc/grpc-go)](https://goreportcard.com/report/github.com/grpc/grpc-go)
6
7The Go implementation of [gRPC](https://grpc.io/): A high performance, open
8source, general RPC framework that puts mobile and HTTP/2 first. For more
9information see the [gRPC Quick Start:
10Go](https://grpc.io/docs/quickstart/go.html) guide.
11
12Installation
13------------
14
15To install this package, you need to install Go and setup your Go workspace on
16your computer. The simplest way to install the library is to run:
17
18```
19$ go get -u google.golang.org/grpc
20```
21
22With Go module support (Go 1.11+), simply `import "google.golang.org/grpc"` in
23your source code and `go [build|run|test]` will automatically download the
24necessary dependencies ([Go modules
25ref](https://github.com/golang/go/wiki/Modules)).
26
27If you are trying to access grpc-go from within China, please see the
28[FAQ](#FAQ) below.
29
30Prerequisites
31-------------
32gRPC-Go requires Go 1.9 or later.
33
34Documentation
35-------------
36- See [godoc](https://godoc.org/google.golang.org/grpc) for package and API
37  descriptions.
38- Documentation on specific topics can be found in the [Documentation
39  directory](Documentation/).
40- Examples can be found in the [examples directory](examples/).
41
42Performance
43-----------
44Performance benchmark data for grpc-go and other languages is maintained in
45[this
46dashboard](https://performance-dot-grpc-testing.appspot.com/explore?dashboard=5652536396611584&widget=490377658&container=1286539696).
47
48Status
49------
50General Availability [Google Cloud Platform Launch
51Stages](https://cloud.google.com/terms/launch-stages).
52
53FAQ
54---
55
56#### I/O Timeout Errors
57
58The `golang.org` domain may be blocked from some countries.  `go get` usually
59produces an error like the following when this happens:
60
61```
62$ go get -u google.golang.org/grpc
63package google.golang.org/grpc: unrecognized import path "google.golang.org/grpc" (https fetch: Get https://google.golang.org/grpc?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
64```
65
66To build Go code, there are several options:
67
68- Set up a VPN and access google.golang.org through that.
69
70- Without Go module support: `git clone` the repo manually:
71
72  ```
73  git clone https://github.com/grpc/grpc-go.git $GOPATH/src/google.golang.org/grpc
74  ```
75
76  You will need to do the same for all of grpc's dependencies in `golang.org`,
77  e.g. `golang.org/x/net`.
78
79- With Go module support: it is possible to use the `replace` feature of `go
80  mod` to create aliases for golang.org packages.  In your project's directory:
81
82  ```
83  go mod edit -replace=google.golang.org/grpc=github.com/grpc/grpc-go@latest
84  go mod tidy
85  go mod vendor
86  go build -mod=vendor
87  ```
88
89  Again, this will need to be done for all transitive dependencies hosted on
90  golang.org as well.  Please refer to [this
91  issue](https://github.com/golang/go/issues/28652) in the golang repo regarding
92  this concern.
93
94#### Compiling error, undefined: grpc.SupportPackageIsVersion
95
96Please update proto package, gRPC package and rebuild the proto files:
97 - `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}`
98 - `go get -u google.golang.org/grpc`
99 - `protoc --go_out=plugins=grpc:. *.proto`
100
101#### How to turn on logging
102
103The default logger is controlled by the environment variables. Turn everything
104on by setting:
105
106```
107GRPC_GO_LOG_VERBOSITY_LEVEL=99 GRPC_GO_LOG_SEVERITY_LEVEL=info
108```
109
110#### The RPC failed with error `"code = Unavailable desc = transport is closing"`
111
112This error means the connection the RPC is using was closed, and there are many
113possible reasons, including:
114 1. mis-configured transport credentials, connection failed on handshaking
115 1. bytes disrupted, possibly by a proxy in between
116 1. server shutdown
117
118It can be tricky to debug this because the error happens on the client side but
119the root cause of the connection being closed is on the server side. Turn on
120logging on __both client and server__, and see if there are any transport
121errors.
122