Pudu programming language
Menu
Package

@chrismichaelps / pudu-lang-httpclient

Named HTTP clients for Pudu: a client factory, delegating handlers, pooled keep-alive connections, handler lifetimes, logging, and resilience

0.1.1Apache-2.01

InstallClose

Defaults.pudu

Pudu54 lines1.9 KB

GitHub ↗
1/** @Constants.Defaults.Module — the numbers every option starts from */2module PuduLangHttpClient.Constants.Defaults34/// A duration that never elapses: no timeout, no lifetime, no idle limit.5export const INFINITE: Int = -167/// A count that never runs out.8export const UNLIMITED: Int = 9223372036854775807910/// The name of the client a factory makes when no name is given.11export const DEFAULT_NAME: Str = ""1213/// How long a client waits for a whole request, in milliseconds: 100 seconds.14export const CLIENT_TIMEOUT: Int = 1000001516/// The most response body bytes a client buffers: 64 MiB.17export const MAX_RESPONSE_BUFFER: Int = 671088641819/// How long a factory reuses one handler pipeline before building the next: two minutes.20export const HANDLER_LIFETIME: Int = 1200002122/// How long a pooled connection may sit unused before it is closed: one minute.23export const POOLED_IDLE_TIMEOUT: Int = 600002425/// How long a pooled connection may live, however busy: forever.26export const POOLED_LIFETIME: Int = -12728/// How many connections one origin may hold open at once: no limit.29export const MAX_CONNECTIONS_PER_SERVER: Int = 92233720368547758073031/// How long opening a connection may take: bounded only by the request's own deadline.32export const CONNECT_TIMEOUT: Int = -13334/// How many redirects the transport follows before it refuses: 50.35export const MAX_REDIRECTS: Int = 503637/// The most bytes a response head may take: 64 KiB.38export const MAX_RESPONSE_HEADERS: Int = 655363940/// How many bytes one read asks the socket for.41export const READ_CHUNK: Int = 655364243/// How long a request waiting for a free connection sleeps before it looks again, in milliseconds.44export const POOL_WAIT_SLICE: Int = 24546/// How often a request in flight looks for an explicit cancellation, in milliseconds.47export const ABORT_POLL: Int = 104849/// The port an http address uses when it names none.50export const HTTP_PORT: Int = 805152/// The port an https address uses when it names none.53export const HTTPS_PORT: Int = 44354