Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Both services expose three RPC methods with the same authorization levels:
Request
defaultInterceptors (error handler, timeout, bulkhead)
defaultInterceptors (error handler, validation)
jwtAuth (extract + verify JWT, set AuthContext)
Expand Down
2 changes: 1 addition & 1 deletion basic-service-bun/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Demonstrates:
- Greeter service with two RPC methods
- Health checks (gRPC + HTTP) via `@connectum/healthcheck`
- Server reflection via `@connectum/reflection`
- Default interceptors (error handler, timeout, bulkhead) via `@connectum/interceptors`
- Default interceptors (error handler, validation) via `@connectum/interceptors`
- Graceful shutdown

## Prerequisites
Expand Down
3 changes: 2 additions & 1 deletion basic-service-bun/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ console.log("🚀 Starting Basic Service Example...\n");
*
* Interceptors are passed explicitly — core has no built-in interceptors.
* Use createDefaultInterceptors() from @connectum/interceptors for the
* production-ready chain (error handler, timeout, bulkhead, etc.).
* default chain (error handler + validation; resilience interceptors
* such as timeout, bulkhead, circuitBreaker, retry are opt-in).
*/
const options: CreateServerOptions = {
// Register services
Expand Down
2 changes: 1 addition & 1 deletion basic-service-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Demonstrates:
- Greeter service with two RPC methods
- Health checks (gRPC + HTTP) via `@connectum/healthcheck`
- Server reflection via `@connectum/reflection`
- Default interceptors (error handler, timeout, bulkhead) via `@connectum/interceptors`
- Default interceptors (error handler, validation) via `@connectum/interceptors`
- Graceful shutdown

## Prerequisites
Expand Down
3 changes: 2 additions & 1 deletion basic-service-node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ console.log("🚀 Starting Basic Service Example...\n");
*
* Interceptors are passed explicitly — core has no built-in interceptors.
* Use createDefaultInterceptors() from @connectum/interceptors for the
* production-ready chain (error handler, timeout, bulkhead, etc.).
* default chain (error handler + validation; resilience interceptors
* such as timeout, bulkhead, circuitBreaker, retry are opt-in).
*/
const options: CreateServerOptions = {
// Register services
Expand Down
2 changes: 1 addition & 1 deletion basic-service-tsx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Demonstrates:
- Greeter service with two RPC methods
- Health checks (gRPC + HTTP) via `@connectum/healthcheck`
- Server reflection via `@connectum/reflection`
- Default interceptors (error handler, timeout, bulkhead) via `@connectum/interceptors`
- Default interceptors (error handler, validation) via `@connectum/interceptors`
- Graceful shutdown

## Prerequisites
Expand Down
3 changes: 2 additions & 1 deletion basic-service-tsx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ console.log("🚀 Starting Basic Service Example...\n");
*
* Interceptors are passed explicitly — core has no built-in interceptors.
* Use createDefaultInterceptors() from @connectum/interceptors for the
* production-ready chain (error handler, timeout, bulkhead, etc.).
* default chain (error handler + validation; resilience interceptors
* such as timeout, bulkhead, circuitBreaker, retry are opt-in).
*/
const options: CreateServerOptions = {
// Register services
Expand Down
15 changes: 8 additions & 7 deletions performance-test-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,10 @@ interceptors: [] // NO interceptors - pure baseline
### Validation Only (Port 8082)

```typescript
// Validation is enabled by default; resilience interceptors are opt-in,
// so only errorHandler needs to be disabled explicitly.
interceptors: createDefaultInterceptors({
errorHandler: false,
timeout: false,
bulkhead: false,
circuitBreaker: false,
retry: false,
validation: true,
serializer: false,
})
```

Expand Down Expand Up @@ -212,8 +208,13 @@ interceptors: [
interceptors: [
...createDefaultInterceptors({
errorHandler: { logErrors: true, includeStackTrace: true },
// Resilience interceptors are opt-in — enabled explicitly here
// so this configuration measures the full chain overhead.
timeout: true,
bulkhead: true,
circuitBreaker: true,
retry: true,
serializer: true,
validation: true,
}),
createLoggerInterceptor({ level: "error", skipHealthCheck: true }),
createOtelInterceptor({
Expand Down
15 changes: 8 additions & 7 deletions performance-test-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,10 @@ const validationOptions: CreateServerOptions = {
port: 8082,
host: "0.0.0.0",
tls: tlsConfig,
// Validation is enabled by default; resilience interceptors are opt-in,
// so only errorHandler needs to be disabled explicitly.
interceptors: createDefaultInterceptors({
errorHandler: false,
timeout: false,
bulkhead: false,
circuitBreaker: false,
retry: false,
validation: true,
serializer: false,
}),
};

Expand Down Expand Up @@ -111,8 +107,13 @@ const fullChainOptions: CreateServerOptions = {
logErrors: true,
includeStackTrace: true,
},
// Resilience interceptors are opt-in — enable them explicitly
// so this configuration measures the full chain overhead.
timeout: true,
bulkhead: true,
circuitBreaker: true,
retry: true,
serializer: true,
validation: true,
}),
createLoggerInterceptor({
level: "error",
Expand Down
2 changes: 1 addition & 1 deletion with-custom-interceptor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ console.log("Starting Custom Interceptor Example...\n");
* Create server with custom interceptors appended after the default chain.
*
* Interceptor execution order:
* 1. Default chain (errorHandler, timeout, bulkhead, circuitBreaker, retry, fallback, serializer)
* 1. Default chain (errorHandler, validation; resilience interceptors are opt-in)
* 2. apiKeyInterceptor — checks x-api-key for SecureEcho
* 3. rateLimitInterceptor — rate-limits RateLimitedEcho
*/
Expand Down