Documentation
¶
Overview ¶
Package transport provides tuned HTTP transports for odek's API clients. All clients (LLM, Telegram, MCP) share the same connection pool to avoid redundant TCP/TLS handshakes on every request.
Index ¶
Constants ¶
View Source
const ( DefaultTimeout = 120 * time.Second DefaultMaxIdleConns = 20 DefaultMaxIdlePerHost = 10 DefaultIdleTimeout = 90 * time.Second DefaultKeepAlive = 30 * time.Second )
Default values for the pooled HTTP transport.
Variables ¶
This section is empty.
Functions ¶
func NewPooledClient ¶
NewPooledClient creates an *http.Client with a tuned transport that reuses TCP/TLS connections across requests. Pass 0 for timeout to use the default (120s).
Use this instead of bare &http.Client{Timeout: ...} in all API clients to avoid the ~200ms per-request overhead of TCP+TLS handshakes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.