grpc.go ×4

Frontier kind: Code frontier

unlabeled · c_f0d1e87fca79

16 tests · 1906 LOC · 83 files · introduces 0 tests · 40 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges40 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
260 ranges1906 lines · 83 files · Browse complete extent
All tests (intent)
16 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 40 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/rpc/grpc.go 32 introduced LOC · 4 ranges

Open complete file

54 metricsHandler metrics.Handler,
55 opts ...grpc.DialOption,
56 > ) (*grpc.ClientConn, error) { grpc.go
57 > var grpcSecureOpt grpc.DialOption
58 > if tlsConfig == nil {
59 grpcSecureOpt = grpc.WithTransportCredentials(insecure.NewCredentials())
60 > } else { grpc.go
61 grpcSecureOpt = grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig))
62 }
67 // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.
68 // Default MaxDelay is 120 seconds which is too high.
69 > var cp = grpc.ConnectParams{ grpc.go
70 > Backoff: backoff.DefaultConfig,
71 > MinConnectTimeout: minConnectTimeout,
72 > }
73 > cp.Backoff.MaxDelay = MaxBackoffDelay
74 >
75 > dtrace := newDialTracer(hostName, metricsHandler, logger)
76 >
77 > contextDialer := func(ctx context.Context, s string) (net.Conn, error) {
78 // Keep the existing gRPC behavior by using OS defaults for TCP keepalive settings.
79 // We are on Go 1.23+ and can use KeepAliveConfig directly instead of the old KeepAlive/Control hacks.
91 }
92
93 > dialOptions := []grpc.DialOption{ grpc.go
94 > grpcSecureOpt,
95 > grpc.WithContextDialer(contextDialer),
96 > grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxInternodeRecvPayloadSize)),
97 > grpc.WithChainUnaryInterceptor(
98 > headersInterceptor,
99 > metrics.NewClientMetricsTrailerPropagatorInterceptor(logger),
100 > errorInterceptor,
101 > ),
102 > grpc.WithChainStreamInterceptor(
103 > interceptor.StreamErrorInterceptor,
104 > ),
105 > grpc.WithDefaultServiceConfig(DefaultServiceConfig),
106 > grpc.WithDisableServiceConfig(),
107 > grpc.WithConnectParams(cp),
108 > }
109 > dialOptions = append(dialOptions, opts...)
110 >
111 > return grpc.NewClient(hostName, dialOptions...)
112 }
113
go.temporal.io/server/common/rpc/rpc.go 8 introduced LOC · 3 ranges

Open complete file

83 requireRemoteClusterAuth := false
84 if cfg != nil {
85 > authHeaderName = cmp.Or(cfg.Global.Authorization.AuthHeaderName, authHeaderName) rpc.go
86 > requireRemoteClusterAuth = cfg.Global.Authorization.RemoteClusterAuth.Require
87 > }
88 f := &RPCFactory{
89 config: cfg,
290 }
291
292 > func (d *RPCFactory) dial(hostName string, tlsClientConfig *tls.Config, dialOptions ...grpc.DialOption) *grpc.ClientConn { rpc.go
293 > dialOptions = append(d.commonDialOptions, dialOptions...)
294 > connection, err := Dial(hostName, tlsClientConfig, d.logger, d.metricsHandler, dialOptions...)
295 > if err != nil {
296 d.logger.Fatal("Failed to create gRPC connection", tag.Error(err))
297 return nil
298 }
299
300 > return connection rpc.go
301 }
302