Home / Function/ Test_httpClientTransport_Interface() — fiber Function Reference

Test_httpClientTransport_Interface() — fiber Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

client/transport_test.go lines 468–506

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

	transports := []struct {
		transport httpClientTransport
		name      string
	}{
		{
			name:      "standardClientTransport",
			transport: newStandardClientTransport(&fasthttp.Client{}),
		},
		{
			name:      "hostClientTransport",
			transport: newHostClientTransport(&fasthttp.HostClient{}),
		},
		{
			name: "lbClientTransport",
			transport: newLBClientTransport(&fasthttp.LBClient{
				Clients: []fasthttp.BalancingClient{
					&fasthttp.HostClient{Addr: "example.com:80"},
				},
			}),
		},
	}

	for _, tt := range transports {
		t.Run(tt.name, func(t *testing.T) {
			t.Parallel()

			transport := tt.transport
			require.NotNil(t, transport.Client())
			initialStream := transport.StreamResponseBody()
			transport.SetStreamResponseBody(!initialStream)
			require.Equal(t, !initialStream, transport.StreamResponseBody())
			transport.SetStreamResponseBody(initialStream)
			require.Equal(t, initialStream, transport.StreamResponseBody())
		})
	}
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free