Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupHttpClientsFactory ¶
Types ¶
type DefaultHttpClientsFactory ¶
type DefaultHttpClientsFactory struct {
// contains filtered or unexported fields
}
DefaultHttpClientsFactory is a thread-safe, caching implementation of HttpClientsFactory. It caches one HTTP client and one health-check client, rebuilding either only when the relevant routing configuration (proxy settings, TLS certificates) changes.
func (*DefaultHttpClientsFactory) GetHealthCheckHttpClient ¶
func (h *DefaultHttpClientsFactory) GetHealthCheckHttpClient() *http.Client
func (*DefaultHttpClientsFactory) GetHttpClient ¶
func (h *DefaultHttpClientsFactory) GetHttpClient(ctx context.Context, routingConfig *controller.RoutingConfig) *http.Client
type HttpClientsFactory ¶
type HttpClientsFactory interface {
// GetHttpClient returns an HTTP client configured with proxy, TLS, and custom CA certificates
// from routingConfig.
GetHttpClient(context.Context, *controller.RoutingConfig) *http.Client
// GetHealthCheckHttpClient returns an HTTP client that skips TLS verification.
// This client MUST only be used for workspace health/readiness checks, not for
// fetching external content or making security-sensitive requests.
GetHealthCheckHttpClient() *http.Client
}
var HttpFactory HttpClientsFactory
type TestHttpClientsFactory ¶
type TestHttpClientsFactory struct {
// contains filtered or unexported fields
}
func (*TestHttpClientsFactory) GetHealthCheckHttpClient ¶
func (t *TestHttpClientsFactory) GetHealthCheckHttpClient() *http.Client
func (*TestHttpClientsFactory) GetHttpClient ¶
func (t *TestHttpClientsFactory) GetHttpClient(_ context.Context, _ *controller.RoutingConfig) *http.Client
Click to show internal directories.
Click to hide internal directories.