bumping knative.dev/pkg c43477f...efddeac: > efddeac Update community files (# 3143) > e5aa25f Bump google.golang.org/grpc from 1.69.4 to 1.70.0 (# 3142) > 7fca699 Bump google.golang.org/protobuf from 1.36.3 to 1.36.4 (# 3141) > dcf1593 Update community files (# 3140) > 3386f37 Bump google.golang.org/protobuf from 1.36.2 to 1.36.3 (# 3139) > 1ca59d1 Bump google.golang.org/grpc from 1.69.2 to 1.69.4 (# 3138) > a37a847 drop use of code-generator/generate-groups.sh (# 3136) bumping golang.org/x/oauth2 3e64809...22134a4: > 22134a4 README: don't recommend go get bumping google.golang.org/genproto/googleapis/api 796eee8...19429a9: > 19429a9 chore(all): update all (# 1171) > e639e21 chore(all): update all (# 1170) > 65e8d21 Fix: GitHub workflow script injection (# 1169) > e0fbfb7 chore(all): update all (# 1168) > dd2ea8e chore(all): update all (# 1166) > 324edc3 chore(all): update all (# 1165) bumping google.golang.org/protobuf 12c6ebd...259e665: > 259e665 all: release v1.36.4 > 5f93d99 internal_gengo: avoid allocations in rawDescGZIP() accessors > 2005adb reflect/protodesc: fix panic when working with dynamicpb > aee8a9c internal_gengo: switch back from string literal to hex byte slice > 0c3cc2f internal_gengo: use unsafe.StringData() to avoid a descriptor copy > cc8d1c2 internal_gengo: store raw descriptor in .rodata section > 132f042 all: start v1.36.3-devel > 54ef969 all: release v1.36.3 > 7cbd915 reflect/protodesc: fix panic when working with dynamicpb > 2f60868 proto: add example for GetExtension, SetExtension > de043b9 runtime/protolazy: replace internal doc link with external link > 42e0fa9 all: split flags.ProtoLegacyWeak out of flags.ProtoLegacy > 5fee2a7 internal/impl: remove unused exporter parameter > 84924f7 internal/impl: switch to reflect.Value.IsZero > fe8430d cmd/protoc-gen-go: remove json struct tags from unexported fields > 84f7738 internal/impl: clean up unneeded Go<1.12 MapRange() alternative > 9acc8f2 types/dynamicpb: switch atomicExtFiles to atomic.Uint64 type > ad89419 all: start v1.36.2-devel bumping knative.dev/hack c142b48...5f7f0f5: > 5f7f0f5 Update community files (# 412) > b38a2ca Update community files (# 411) bumping google.golang.org/genproto/googleapis/rpc 796eee8...19429a9: > 19429a9 chore(all): update all (# 1171) > e639e21 chore(all): update all (# 1170) > 65e8d21 Fix: GitHub workflow script injection (# 1169) > e0fbfb7 chore(all): update all (# 1168) > dd2ea8e chore(all): update all (# 1166) > 324edc3 chore(all): update all (# 1165) bumping google.golang.org/grpc b615b35...98a0092: > 98a0092 Change version to 1.70.0 (# 7984) > bf380de Cherrypick # 7998, # 8011, # 8010 into 1.70.x (# 8028) > 54b3eb9 experimental/credentials: Add credentials that don't enforce ALPN (# 7980) (# 8012) > 62b9185 clustetresolver: Copy endpoints.Addresses slice from DNS updates to avoid data races (# 7991) (# 8004) > 724f450 examples/features/csm_observability: use helloworld client and server instead of echo client and server (# 7945) > e8d5feb rbac: add method name to :path in headers (# 7965) > e912015 cleanup: Fix usages of non-constant format strings (# 7959) > 681334a cleanup: replace dial with newclient (# 7943) > 063d352 internal/resolver: introduce a new resolver to handle target URI and proxy address resolution (# 7857) > 10c7e13 outlierdetection: Support health listener for ejection updates (# 7908) > bce0535 test: Add a test for decompression exceeding max receive message size (# 7938) > f32168c envconfig: enable xDS client fallback by default (# 7949) > e957825 test: Workaround slow SRV lookups in flaking test (# 7957) > e5a4eb0 deps: update crypto dependency to resolve CVE-2024-45337 (# 7956) > 56a14ba cleanup: replace dial with newclient (# 7920) > b3bdacb test: switching to stubserver in tests instead of testservice (# 7925) > e8055ea grpcs: update `WithContextDialer` documentation to include using passthrough resolver (# 7916) > d0716f9 examples/features/csm_observability: Make CSM Observability example server listen on an IPV4 address (# 7933) > cc161de xds: Add support for multiple addresses per endpoint (# 7858) > 3f76275 xdsclient: stop caching xdsChannels for potential reuse, after all references are released (# 7924) > 7ee073d experimental/stats: re-add type aliases for migration (# 7929) > 38a8b9a health, grpc: Deliver health service updates through the health listener (# 7900) > c1b6b37 Update README.md (# 7921) > e4d084a examples: replace printf with print for log message in gracefulstop (# 7917) > b1f70ce test: replace grpc.Dial with grpc.NewClient > 0027558 internal/transport: replace integer status codes with http constants (# 7910) > 66ba4b2 examples/features/gracefulstop: add example to demonstrate server graceful stop (# 7865) > adad26d test/kokoro: Add psm-fallback build config (# 7899) > f53724d serviceconfig: Return errors instead of skipping invalid retry policy config (# 7905) > 645aadf deps: update dependencies for all modules (# 7904) > d7286fb Change version to 1.70.0-dev (# 7903) Signed-off-by: Knative Automation <automation@knative.team> |
||
---|---|---|
.. | ||
attributes | ||
backoff | ||
balancer | ||
binarylog/grpc_binarylog_v1 | ||
channelz | ||
codes | ||
connectivity | ||
credentials | ||
encoding | ||
experimental/stats | ||
grpclog | ||
health/grpc_health_v1 | ||
internal | ||
keepalive | ||
mem | ||
metadata | ||
peer | ||
resolver | ||
serviceconfig | ||
stats | ||
status | ||
tap | ||
AUTHORS | ||
CODE-OF-CONDUCT.md | ||
CONTRIBUTING.md | ||
GOVERNANCE.md | ||
LICENSE | ||
MAINTAINERS.md | ||
Makefile | ||
NOTICE.txt | ||
README.md | ||
SECURITY.md | ||
backoff.go | ||
balancer_wrapper.go | ||
call.go | ||
clientconn.go | ||
codec.go | ||
dialoptions.go | ||
doc.go | ||
interceptor.go | ||
picker_wrapper.go | ||
preloader.go | ||
resolver_wrapper.go | ||
rpc_util.go | ||
server.go | ||
service_config.go | ||
stream.go | ||
stream_interfaces.go | ||
trace.go | ||
trace_notrace.go | ||
trace_withtrace.go | ||
version.go |
README.md
gRPC-Go
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 Go gRPC docs, or jump directly into the quick start.
Prerequisites
Installation
Simply add the following import to your code, and then go [build|run|test]
will automatically fetch the necessary dependencies:
import "google.golang.org/grpc"
Note: If you are trying to access
grpc-go
from China, see the FAQ below.
Learn more
- Go gRPC docs, which include a quick start and API reference among other resources
- Low-level technical docs from this repository
- Performance benchmark
- Examples
FAQ
I/O Timeout Errors
The golang.org
domain may be blocked from some countries. go get
usually
produces an error like the following when this happens:
$ go get -u google.golang.org/grpc
package 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)
To build Go code, there are several options:
-
Set up a VPN and access google.golang.org through that.
-
With Go module support: it is possible to use the
replace
feature ofgo mod
to create aliases for golang.org packages. In your project's directory:go mod edit -replace=google.golang.org/grpc=github.com/grpc/grpc-go@latest go mod tidy go mod vendor go build -mod=vendor
Again, this will need to be done for all transitive dependencies hosted on golang.org as well. For details, refer to golang/go issue #28652.
Compiling error, undefined: grpc.SupportPackageIsVersion
Please update to the latest version of gRPC-Go using
go get google.golang.org/grpc
.
How to turn on logging
The default logger is controlled by environment variables. Turn everything on like this:
$ export GRPC_GO_LOG_VERBOSITY_LEVEL=99
$ export GRPC_GO_LOG_SEVERITY_LEVEL=info
The RPC failed with error "code = Unavailable desc = transport is closing"
This error means the connection the RPC is using was closed, and there are many possible reasons, including:
- mis-configured transport credentials, connection failed on handshaking
- bytes disrupted, possibly by a proxy in between
- server shutdown
- Keepalive parameters caused connection shutdown, for example if you have configured your server to terminate connections regularly to trigger DNS lookups. If this is the case, you may want to increase your MaxConnectionAgeGrace, to allow longer RPC calls to finish.
It can be tricky to debug this because the error happens on the client side but the root cause of the connection being closed is on the server side. Turn on logging on both client and server, and see if there are any transport errors.