{"modulePath":"github.com/devfile/devworkspace-operator","version":"v1.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package httpfactory\n\n## Functions\n\n```go\nfunc SetupHttpClientsFactory(k8s client.Client, logger logr.Logger) error\n```\n\n```go\nfunc SetupHttpClientsForTesting(client *http.Client)\n```\n\n## Types\n\n```go\ntype DefaultHttpClientsFactory struct {\n\t// contains filtered or unexported fields\n}\n```\nDefaultHttpClientsFactory 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.\n\n```go\nfunc (h *DefaultHttpClientsFactory) GetHealthCheckHttpClient() *http.Client\n```\n\n```go\nfunc (h *DefaultHttpClientsFactory) GetHttpClient(ctx context.Context, routingConfig *controller.RoutingConfig) *http.Client\n```\n\n```go\ntype HttpClientsFactory interface {\n\t// GetHttpClient returns an HTTP client configured with proxy, TLS, and custom CA certificates\n\t// from routingConfig.\n\tGetHttpClient(context.Context, *controller.RoutingConfig) *http.Client\n\n\t// GetHealthCheckHttpClient returns an HTTP client that skips TLS verification.\n\t// This client MUST only be used for workspace health/readiness checks, not for\n\t// fetching external content or making security-sensitive requests.\n\tGetHealthCheckHttpClient() *http.Client\n}\n```\n\n```go\nvar HttpFactory HttpClientsFactory\n```\n\n```go\ntype TestHttpClientsFactory struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (t *TestHttpClientsFactory) GetHealthCheckHttpClient() *http.Client\n```\n\n```go\nfunc (t *TestHttpClientsFactory) GetHttpClient(_ context.Context, _ *controller.RoutingConfig) *http.Client\n```\n\n","path":"github.com/devfile/devworkspace-operator/pkg/httpfactory","name":"httpfactory","synopsis":"","isRedistributable":true}
