Test_Proxy_Balancer_WithTlsConfig() — fiber Function Reference
Architecture documentation for the Test_Proxy_Balancer_WithTlsConfig() function in proxy_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD d29f3efb_6733_d009_8011_f05f1dc75abf["Test_Proxy_Balancer_WithTlsConfig()"] a7c70172_e40a_6ad6_65b6_b8f508cfb0a2["proxy_test.go"] d29f3efb_6733_d009_8011_f05f1dc75abf -->|defined in| a7c70172_e40a_6ad6_65b6_b8f508cfb0a2 fc2b6784_0dfb_d6e2_4148_406d442e8019["startServer()"] d29f3efb_6733_d009_8011_f05f1dc75abf -->|calls| fc2b6784_0dfb_d6e2_4148_406d442e8019 style d29f3efb_6733_d009_8011_f05f1dc75abf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/proxy/proxy_test.go lines 158–194
func Test_Proxy_Balancer_WithTlsConfig(t *testing.T) {
t.Parallel()
serverTLSConf, _, err := tlstest.GetTLSConfigs()
require.NoError(t, err)
ln, err := net.Listen(fiber.NetworkTCP4, "127.0.0.1:0")
require.NoError(t, err)
ln = tls.NewListener(ln, serverTLSConf)
app := fiber.New()
app.Get("/tlsbalancer", func(c fiber.Ctx) error {
return c.SendString("tls balancer")
})
addr := ln.Addr().String()
clientTLSConf := &tls.Config{InsecureSkipVerify: true} //nolint:gosec // We're in a test func, so this is fine
// disable certificate verification in Balancer
app.Use(Balancer(Config{
Servers: []string{addr},
TLSConfig: clientTLSConf,
}))
startServer(app, ln)
client := clientpkg.New()
client.SetTLSConfig(clientTLSConf)
resp, err := client.Get("https://" + addr + "/tlsbalancer")
require.NoError(t, err)
require.Equal(t, fiber.StatusOK, resp.StatusCode())
require.Equal(t, "tls balancer", string(resp.Body()))
resp.Close()
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does Test_Proxy_Balancer_WithTlsConfig() do?
Test_Proxy_Balancer_WithTlsConfig() is a function in the fiber codebase, defined in middleware/proxy/proxy_test.go.
Where is Test_Proxy_Balancer_WithTlsConfig() defined?
Test_Proxy_Balancer_WithTlsConfig() is defined in middleware/proxy/proxy_test.go at line 158.
What does Test_Proxy_Balancer_WithTlsConfig() call?
Test_Proxy_Balancer_WithTlsConfig() calls 1 function(s): startServer.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free