@forwardimpact/librpc
v0.1.112
Published
gRPC server and client framework — ship service endpoints without reimplementing transport.
Readme
librpc
gRPC server and client framework — ship service endpoints without reimplementing transport.
Getting Started
import { Server, Client, createClient, createTracer } from '@forwardimpact/librpc';Unary deadlines
Every unary call carries one absolute gRPC deadline. The deadline spans
all retry attempts. The default is 60s. That default matches the slowest
unary in practice (embedding model inference). A hung connection fails
with DEADLINE_EXCEEDED. Retryable errors (UNAVAILABLE and friends)
cycle only until the call spends its budget. The first attempt past the
deadline fails immediately. DEADLINE_EXCEEDED gets no retry. Override
the deadline per service with the deadline config key (milliseconds)
in the service's config block. Once the key exists there, the
SERVICE_{NAME}_DEADLINE env var overrides it. Streaming calls are
exempt. Keepalive bounds them, and long-lived streams are legitimate.
Documentation
- Ship a Service Endpoint
— ship and consume a gRPC service with typed contracts, authentication,
retries, and health checks.
fit-unaryis the command-line client for it. - Keep Types Synced with Proto Definitions — the full workflow to define proto contracts and generate typed base classes and clients.
