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

_MOC.md

Markdown48 lines2.2 KB

GitHub ↗

Architecture


type: moc tags: [moc, architecture] aliases: [Architecture]


Shape

A program describes each named client with [[src/PuduLangHttpClient/Factory/Builder|builders]] and builds a [[src/PuduLangHttpClient/Factory|factory]], which reports every configuration problem at once. Asking the factory for a client hands back a cheap [[src/PuduLangHttpClient/Client|client]] over the name's current [[src/PuduLangHttpClient/Factory/Entry|handler pipeline]]: observers and delegating [[src/PuduLangHttpClient/Handler|handlers]] composed around a primary handler, usually a pooled [[src/PuduLangHttpClient/Transport|transport]]. Pipelines are reused until their lifetime runs out, then rebuilt; retired pipelines are closed after a grace period.

Every layer answers an Outcome, so a refusal by one layer is a value the layers outside it judge like any other ([[decisions/ADR-0001-outcomes-not-exceptions]]).

Layers

LayerHoldsMay import
Constants/messages, defaults, log templatesnothing
Utils/templates, shared state, linked tokensstd, Constants
Domain/addresses, headers, chunked decoding, dates, cookies, redirects, persistence, expiry, versionsstd, Constants, each other
messagesOptions, Content, Request, Response, Handler, Cookies, ProxyDomain, Utils, Constants, std
Transport/wire, writer, exchange, pool, connect, hop, and the transportmessages, Domain, Utils, std
client and factoryClient, Client/Json, Endpoint, Stub, Factory/, Eventseverything above
Events/Busthe mediator the package ownspudu-lang-mediator, Events, Factory.Builder
Handlers/logging, resilience, propagation, authorization, metricspublic modules, pudu-lang-log, pudu-lang-resilience

Domain/ performs no effects. Only Handlers/Logging, Handlers/Resilience, and Events/Bus import other packages ([[decisions/ADR-0005-integrations-at-the-edge]], [[decisions/ADR-0006-internal-event-bus]]).

Pages

  • [[architecture/LANGUAGE]] — the vocabulary every page uses.
  • [[architecture/TESTING]] — the test levels and what each proves.
  • [[grammar/pudu]] — the language rules the code follows.

Referenced by

[[00-INDEX]]