titan_envoy 1.0.0
titan_envoy: ^1.0.0 copied to clipboard
Envoy — Titan's HTTP client & API layer. Interceptors, caching, auth, metrics, and route-based data loading.
Changelog #
1.0.0 #
Added #
Core HTTP Client
- Envoy — Full-featured HTTP client with interceptor pipeline, timeouts, redirects, and response streaming
- Missive — Request builder with method, headers, body, query params, and cancel token support
- Dispatch — Response wrapper with status code, headers, body, and timing metadata
- Method — HTTP method enum (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS)
- EnvoyError — Typed error hierarchy with
EnvoyErrorType(connectTimeout, sendTimeout, receiveTimeout, cancel, response, other)
Interceptor Pipeline (Couriers)
- Courier — Base interceptor class with
onRequest,onResponse,onErrorhooks - CourierChain — Interceptor chain with ordered execution and short-circuiting
- LogCourier — Request/response logging with configurable detail levels
- RetryCourier — Automatic retry with exponential backoff and configurable conditions
- AuthCourier — Token injection with automatic refresh on 401 responses
- CacheCourier — HTTP caching with
CachePolicystrategies (networkFirst, cacheFirst, staleWhileRevalidate, networkOnly, cacheOnly) - MetricsCourier — Request metrics collection and Colossus integration
- DedupCourier — Deduplicates concurrent identical GET requests
- CookieCourier — Cookie jar management (set-cookie/cookie headers)
Caching
- EnvoyCache — Cache interface with
CacheEntrystorage - MemoryCache — In-memory TTL-based cache with LRU eviction
- CachePolicy — Cache strategy configuration (ttl, staleAge, methods, statusCodes)
Advanced Features
- Recall — Cancel token for aborting in-flight requests
- Parcel — Multipart form data with
ParcelFileandParcelEntrysupport - Gate — Request throttling with configurable concurrency limits
- EnvoySocket — WebSocket client with
SocketStatuslifecycle management - EnvoySse — Server-Sent Events client with
SseEventparsing - EnvoyPin — SSL certificate pinning with SHA-256 fingerprints
- EnvoyProxy — HTTP/SOCKS proxy configuration
- EnvoyMetric — Per-request performance metrics (latency, bytes, status)
Titan Ecosystem Integration
- EnvoyPillar — Pillar base class for HTTP-backed state management
- EnvoyModule — DI module for registering Envoy in Titan's Vault
- EnvoyPillarExtension —
envoyQuarryandenvoyCodexextensions for route-based data fetching with Quarry and Codex
