Home / Function/ TestHostClientTransportClientAccessor() — fiber Function Reference

TestHostClientTransportClientAccessor() — fiber Function Reference

Architecture documentation for the TestHostClientTransportClientAccessor() function in transport_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  f491412e_1a1a_c392_15f1_a4b237e2fdf0["TestHostClientTransportClientAccessor()"]
  b137f470_30b5_d002_b6e6_5173073c07e3["transport_test.go"]
  f491412e_1a1a_c392_15f1_a4b237e2fdf0 -->|defined in| b137f470_30b5_d002_b6e6_5173073c07e3
  style f491412e_1a1a_c392_15f1_a4b237e2fdf0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

client/transport_test.go lines 122–141

func TestHostClientTransportClientAccessor(t *testing.T) {
	t.Parallel()

	host := &fasthttp.HostClient{Addr: "example.com:80"}
	transport := newHostClientTransport(host)

	current, ok := transport.Client().(*fasthttp.HostClient)
	require.True(t, ok)
	require.Same(t, host, current)

	hostTLS := &tls.Config{ServerName: "host", MinVersion: tls.VersionTLS12}
	host.TLSConfig = hostTLS

	cfg := transport.TLSConfig()
	require.Same(t, hostTLS, cfg)

	override := &tls.Config{ServerName: "host-override", MinVersion: tls.VersionTLS13}
	transport.SetTLSConfig(override)
	require.Equal(t, override, host.TLSConfig)
}

Domain

Subdomains

Frequently Asked Questions

What does TestHostClientTransportClientAccessor() do?
TestHostClientTransportClientAccessor() is a function in the fiber codebase, defined in client/transport_test.go.
Where is TestHostClientTransportClientAccessor() defined?
TestHostClientTransportClientAccessor() is defined in client/transport_test.go at line 122.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free