caching/vendor/google.golang.org/grpc
Knative Automation 1dec38fa05
upgrade to latest dependencies (#935)
bumping google.golang.org/genproto/googleapis/api e9438ea...56aae31:
  > 56aae31 chore(all): update all (# 1190)
  > 5a70512 chore(all): remove toolchain from go.mod (# 1189)
bumping knative.dev/pkg ed3e215...d5e74d2:
  > d5e74d2 Update community files (# 3174)
  > 757c99c Bump google.golang.org/grpc from 1.71.1 to 1.72.0 (# 3173)
  > a877090 Update community files (# 3171)
bumping google.golang.org/genproto/googleapis/rpc e9438ea...56aae31:
  > 56aae31 chore(all): update all (# 1190)
  > 5a70512 chore(all): remove toolchain from go.mod (# 1189)
bumping google.golang.org/grpc cdbdb75...a43eba6:
  > a43eba6 Change version to 1.72.0 (# 8218)
  > 48f48c1 balancer/pickfirstleaf: Avoid reading Address.Metadata (# 8227) (# 8259)
  > fd6f585 Cherry-pick # 8159 and # 8243 to v1.72.x (# 8255)
  > 79ca174 stats/opentelemetry: fix trace attributes message sequence numbers to start from 0 (# 8237) (# 8252)
  > 57a2605 xdsclient: fix TestServerFailureMetrics_BeforeResponseRecv test to wait for watch to start before stopping the listener (# 8217)
  > 5edab9e xdsclient: add grpc.xds_client.server_failure counter mertric (# 8203)
  > 78ba661 regenerate protos (# 8208)
  > 6819ed7 delegatingresolver: Stop calls into delegates once the parent resolver is closed (# 8195)
  > a51009d resolver: convert EndpointMap to use generics (# 8189)
  > b0d1203 resolver: create AddressMapV2 with generics to replace AddressMap (# 8187)
  > 43a4a84 internal/balancer/clusterimpl: replace testpb with testgrpc (# 8188)
  > d8924ac xds: fix support for load reporting in LOGICAL_DNS clusters (# 8170)
  > ce2fded xds: fix support for circuit breakers in LOGICAL_DNS clusters (# 8169)
  > eb744de resolver: Make EndpointMap's Get, Set and Delete operations O(1) (# 8179)
  > 8d8571e stats: Improved sequencing documentation for server-side stats events and added tests. (# 7885)
  > 0af5a16 grpc: fix bug causing an extra Read if a compressed message is the same size as the limit (# 8178)
  > 1703656 xds: generic xDS client transport channel and ads stream implementation (# 8144)
  > c27e6dc xdsclient: read bootstrap config before creating the first xDS client in DefaultPool (# 8164)
  > 1f6b0cf [Security] Add support for SPIFFE Bundle Maps in certificate providers (# 8167)
  > 775150f stats/opentelemetry: use TextMapProvider and TracerProvider from TraceOptions instead of otel global (# 8166)
  > d860daa example/features/retry: fix grpc.NewClient call in documentation (# 8163)
  > 75d4a60 [Security] Add support for parsing SPIFFE Bundle Maps (# 8124)
  > 5ac9042 balancer/rls: allow maxAge to exceed 5m if staleAge is set (# 8137)
  > bdba42f xds: emit resource-not-found logs at Warning level (# 8158)
  > a0a739f xds: ensure node ID is populated in errors from the server (# 8140)
  > 5668c66 resolver/manual: allow calling UpdateState with an un-Built resolver (# 8150)
  > 5199327 grpc: Add endpoints in resolverWrapper.NewAddresses (# 8149)
  > f49c747 balancer/pickfirst/pickfirstleaf: fix race condition in tests (# 8148)
  > af07815 xds: introduce generic xds clients xDS and LRS Client API signatures (# 8042)
  > 8c080da priority: Send and validate connection error in test (# 8143)
  > e8c412d *: Regenerate protos (# 8142)
  > 0914bba interop: Wait for server to become ready in alts interop tests (# 8141)
  > bffa4be xds: ensure xDS node ID is populated in errors from xds resolver and cds lb policy (# 8131)
  > 8ae4b7d clusterresolver: Lower log level when ExitIdle is called with no child (# 8133)
  > 0d6e39f transport: Send RST stream from the server when deadline expires (# 8071)
  > 7505bf2 xds: introduce simple grpc transport for generic xds clients (# 8066)
  > 01080d5 stats/openetelemetry: refactor and make e2e test stats verification deterministic (# 8077)
  > b0f5027 cleanup: replace dial with newclient (# 7970)
  > 52a257e cleanup: replace dial with newclient (# 7967)
  > d48317f github: change test action to cover the legacy pickfirst balancer (# 8129)
  > a510cf5 xds, pickfirst: Enable additional addresses in xDS, set new pick_first as default (# 8126)
  > e9c0617 xds: simplify code handling certain error conditions in the resolver (# 8123)
  > feaf942 cds: stop child policies on resource-not-found errors (# 8122)
  > dbf92b4 deps: update dependencies for all modules (# 8108)
  > aa629e0 balancergroup: Make closing terminal (# 8095)
  > e0ac3ac xdsclient: Add error type for NACKed resources (# 8117)
  > 65c6718 examples/features/dualstack: Demonstrate Dual Stack functionality (# 8098)
  > c75fc8e chore: enable early-return and unnecessary-stmt and useless-break from revive (# 8100)
  > c7db760 xdsclient: ensure xDS node ID in included in NACK and connectivity errors (# 8103)
  > 42fc25a weightedroundrobin: Move functions to manage Endpoint weights into a new internal package (# 8087)
  > 607565d Change version to 1.72.0-dev (# 8107)
bumping knative.dev/hack c577ed9...c4037b0:
  > c4037b0 Update community files (# 423)
  > cfde8c9 Update community files (# 422)

Signed-off-by: Knative Automation <automation@knative.team>
2025-05-01 12:59:08 +00:00
..
attributes upgrade to latest dependencies (#805) 2023-11-01 19:10:25 +00:00
backoff upgrade to latest dependencies (#891) 2024-09-17 10:57:44 +00:00
balancer upgrade to latest dependencies (#935) 2025-05-01 12:59:08 +00:00
binarylog/grpc_binarylog_v1 upgrade to latest dependencies (#935) 2025-05-01 12:59:08 +00:00
channelz Bump google.golang.org/grpc to the latest version (#761) 2023-07-07 01:18:43 +00:00
codes upgrade to latest dependencies (#868) 2024-05-21 13:45:15 +00:00
connectivity upgrade to latest dependencies (#539) 2021-09-29 06:14:22 -07:00
credentials upgrade to latest dependencies (#921) 2025-01-29 14:27:55 +00:00
encoding upgrade to latest dependencies (#891) 2024-09-17 10:57:44 +00:00
experimental/stats upgrade to latest dependencies (#914) 2025-01-13 19:52:00 +00:00
grpclog upgrade to latest dependencies (#914) 2025-01-13 19:52:00 +00:00
health/grpc_health_v1 upgrade to latest dependencies (#935) 2025-05-01 12:59:08 +00:00
internal upgrade to latest dependencies (#935) 2025-05-01 12:59:08 +00:00
keepalive upgrade to latest dependencies (#893) 2024-09-23 13:46:29 +00:00
mem upgrade to latest dependencies (#914) 2025-01-13 19:52:00 +00:00
metadata upgrade to latest dependencies (#891) 2024-09-17 10:57:44 +00:00
peer upgrade to latest dependencies (#868) 2024-05-21 13:45:15 +00:00
resolver upgrade to latest dependencies (#935) 2025-05-01 12:59:08 +00:00
serviceconfig Bump google.golang.org/grpc to the latest version (#761) 2023-07-07 01:18:43 +00:00
stats upgrade to latest dependencies (#935) 2025-05-01 12:59:08 +00:00
status upgrade to latest dependencies (#783) 2023-09-12 16:24:10 +00:00
tap upgrade to latest dependencies (#805) 2023-11-01 19:10:25 +00:00
AUTHORS Generate injection client for knative/caching. (#34) 2019-06-05 11:23:38 -07:00
CODE-OF-CONDUCT.md Migrate caching to go mod (#258) 2020-04-27 14:35:51 -07:00
CONTRIBUTING.md upgrade to latest dependencies (#905) 2024-11-15 11:21:44 +00:00
GOVERNANCE.md Migrate caching to go mod (#258) 2020-04-27 14:35:51 -07:00
LICENSE Generate injection client for knative/caching. (#34) 2019-06-05 11:23:38 -07:00
MAINTAINERS.md upgrade to latest dependencies (#891) 2024-09-17 10:57:44 +00:00
Makefile upgrade to latest dependencies (#868) 2024-05-21 13:45:15 +00:00
NOTICE.txt upgrade to latest dependencies (#539) 2021-09-29 06:14:22 -07:00
README.md upgrade to latest dependencies (#879) 2024-07-10 18:59:20 +00:00
SECURITY.md upgrade to latest dependencies (#891) 2024-09-17 10:57:44 +00:00
backoff.go Bump google.golang.org/grpc to the latest version (#761) 2023-07-07 01:18:43 +00:00
balancer_wrapper.go upgrade to latest dependencies (#927) 2025-03-13 16:49:38 +00:00
call.go upgrade to latest dependencies (#785) 2023-09-20 13:18:14 +00:00
clientconn.go upgrade to latest dependencies (#935) 2025-05-01 12:59:08 +00:00
codec.go upgrade to latest dependencies (#914) 2025-01-13 19:52:00 +00:00
dialoptions.go upgrade to latest dependencies (#927) 2025-03-13 16:49:38 +00:00
doc.go upgrade to latest dependencies (#891) 2024-09-17 10:57:44 +00:00
interceptor.go upgrade to latest dependencies (#783) 2023-09-12 16:24:10 +00:00
picker_wrapper.go upgrade to latest dependencies (#927) 2025-03-13 16:49:38 +00:00
preloader.go upgrade to latest dependencies (#914) 2025-01-13 19:52:00 +00:00
resolver_wrapper.go upgrade to latest dependencies (#931) 2025-04-14 22:56:12 +00:00
rpc_util.go upgrade to latest dependencies (#931) 2025-04-14 22:56:12 +00:00
server.go upgrade to latest dependencies (#927) 2025-03-13 16:49:38 +00:00
service_config.go upgrade to latest dependencies (#921) 2025-01-29 14:27:55 +00:00
stream.go upgrade to latest dependencies (#927) 2025-03-13 16:49:38 +00:00
stream_interfaces.go upgrade to latest dependencies (#893) 2024-09-23 13:46:29 +00:00
trace.go upgrade to latest dependencies (#840) 2024-02-29 19:08:07 +00:00
trace_notrace.go upgrade to latest dependencies (#840) 2024-02-29 19:08:07 +00:00
trace_withtrace.go upgrade to latest dependencies (#840) 2024-02-29 19:08:07 +00:00
version.go upgrade to latest dependencies (#935) 2025-05-01 12:59:08 +00:00

README.md

gRPC-Go

GoDoc GoReportCard codecov

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

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 of go 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:

  1. mis-configured transport credentials, connection failed on handshaking
  2. bytes disrupted, possibly by a proxy in between
  3. server shutdown
  4. 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.