Documentation
¶
Overview ¶
Package httputil provides HTTP client and transport utilities used across Genie.
It solves the problem of centralizing TLS configuration (NIST 2030 minimums: TLS 1.2+, strong ciphers) so that all outbound HTTP calls use a consistent, secure default. SetDefaultTLSConfig is called at startup from config; GetClient and NewRoundTripper then use it for MCP, web search, OAuth, and other HTTP clients. Without this package, each integration would configure TLS separately and security policy would be harder to enforce.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClient ¶
func GetClient(requestEnhancer ...RequestEnhancer) *http.Client
func NewRoundTripper ¶
func NewRoundTripper(requestEnhancer ...RequestEnhancer) http.RoundTripper
NewRoundTripper returns an http.RoundTripper that uses NIST 2030–compliant TLS when SetDefaultTLSConfig has been called (min TLS 1.2, optional cipher restriction).
func SetDefaultTLSConfig ¶
SetDefaultTLSConfig sets the TLS config used by GetClient and NewRoundTripper. Call this at startup (e.g. from config) to enforce NIST 2030 minimums (TLS 1.2+). When nil, no custom TLS config is applied (Go defaults apply). The config is cloned so later mutation by the caller does not affect the default.
Types ¶
type RequestEnhancer ¶
type RoundTripper ¶
type RoundTripper struct {
// contains filtered or unexported fields
}