Documentation
¶
Overview ¶
Package httpclient centralizes HTTP timeout defaults so the rest of the codebase doesn't sprinkle magic numbers across packages.
Index ¶
Constants ¶
View Source
const ( // PluginCallTimeout bounds Lua-driven plugin HTTP calls (plugin/http.go). PluginCallTimeout = 10 * time.Second // RegistryFetchTimeout bounds plugin registry / plugin file fetches (plugins/embed.go). RegistryFetchTimeout = 10 * time.Second // RemoteImageTimeout bounds inline image fetches (view/html.go). // Kept short so message rendering doesn't stall. RemoteImageTimeout = 5 * time.Second // InstallTimeout bounds CLI install downloads (cli/install.go). InstallTimeout = 30 * time.Second // UpdateCheckTimeout bounds version checks and asset downloads from main (main.go). UpdateCheckTimeout = 30 * time.Second // IMAPBatchActionTimeout bounds bulk IMAP operations (delete/archive/move) from main (main.go). IMAPBatchActionTimeout = 60 * time.Second // IMAPSearchTimeout bounds server-side IMAP search queries from main (main.go). IMAPSearchTimeout = 60 * time.Second )
Named timeouts. Each constant documents the call site it covers so future contributors don't have to grep for callers.
Variables ¶
This section is empty.
Functions ¶
func NewWithRedirectCap ¶
NewWithRedirectCap returns an http.Client with the given timeout and a hard cap on the number of redirects it will follow before giving up. Used by the main update / asset download client to avoid infinite chains.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.