rpc.go ×6

Frontier kind: Code frontier

unlabeled · c_525ea1340c17

15 tests · 1871 LOC · 78 files · introduces 0 tests · 34 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges34 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
250 ranges1871 lines · 78 files · Browse complete extent
All tests (intent)
15 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.

1 file ranked by introduced lines: 34 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/rpc/rpc.go 34 introduced LOC · 6 ranges

Open complete file

320
321 // CreateLocalFrontendHTTPClient gets or creates a cached frontend client.
322 > func (d *RPCFactory) CreateLocalFrontendHTTPClient() (*common.FrontendHTTPClient, error) { rpc.go
323 > return d.localFrontendClient()
324 > }
325
326 // createLocalFrontendHTTPClient creates an HTTP client for communicating with the frontend.
327 // It uses either the provided frontendURL or membership to resolve the frontend address.
328 > func (d *RPCFactory) createLocalFrontendHTTPClient() (*common.FrontendHTTPClient, error) { rpc.go
329 > // dialer and transport field values copied from http.DefaultTransport.
330 > dialer := &net.Dialer{
331 > Timeout: 30 * time.Second,
332 > KeepAlive: 30 * time.Second,
333 > }
334 > transport := &http.Transport{
335 > Proxy: http.ProxyFromEnvironment,
336 > DialContext: dialer.DialContext,
337 > ForceAttemptHTTP2: true,
338 > MaxIdleConns: 100,
339 > IdleConnTimeout: 90 * time.Second,
340 > TLSHandshakeTimeout: 10 * time.Second,
341 > ExpectContinueTimeout: 1 * time.Second,
342 > }
343 > client := http.Client{}
344 >
345 > // Default to http unless TLS is configured.
346 > scheme := "http"
347 > if d.frontendTLSConfig != nil {
348 transport.TLSClientConfig = d.frontendTLSConfig
349 scheme = "https"
350 }
351
352 > var address string rpc.go
353 > if r := serviceResolverFromGRPCURL(d.frontendHTTPURL); r != nil {
354 client.Transport = &roundTripper{
355 resolver: r,
358 }
359 address = "internal" // This will be replaced by the roundTripper
360 > } else { rpc.go
361 // Use the URL as-is and leave the transport unmodified.
362 client.Transport = transport
364 }
365
366 > return &common.FrontendHTTPClient{ rpc.go
367 > Client: client,
368 > Address: address,
369 > Scheme: scheme,
370 > }, nil
371 }
372
401 // serviceResolverFromGRPCURL returns a ServiceResolver if ustr corresponds to a
402 // membership url, otherwise nil.
403 > func serviceResolverFromGRPCURL(ustr string) membership.ServiceResolver { rpc.go
404 > u, err := url.Parse(ustr)
405 > if err != nil {
406 return nil
407 }