You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: sync docs with codebase — startup/shutdown sequences, API names, missing package
- architecture.md: fix startup sequence order (handlers register before
servers start, not after), expand shutdown sequence to match actual
code (9 steps including admin server, graceful stop, force stop),
correct options API from Set/Get to AddToOptions/FromContext, add
admin port to deployment topology diagram
- Packages.md: add missing options package entry
- integrations.md: fix Sentry env var RELEASE → RELEASE_NAME
- production.md, signals.md: add admin server shutdown step
- Index.md: add link to full interceptor chain from simplified diagram
Copy file name to clipboardExpand all lines: Index.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,8 @@ Run `buf generate` — it creates typed Go interfaces from your proto definition
117
117
│ │
118
118
│ /metrics /healthcheck /debug/pprof │
119
119
└─────────────────────────────────────────┘
120
+
121
+
See the [full interceptor chain](/architecture#server-interceptor-chain) for all 10 interceptors including timeout, rate limiting, debug logging, and New Relic.
Copy file name to clipboardExpand all lines: Packages.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,11 @@ hystrixprometheus provides a Prometheus metrics collector for Hystrix (https://g
55
55
56
56
Documentation can be found at [hystrixprometheus-docs]
57
57
58
+
## [Options]
59
+
options is a request-scoped key-value store that propagates metadata through `context.Context` using RWMutex+map. Used by interceptors to pass metadata between layers. Only string keys are supported.
60
+
61
+
Documentation can be found at [options-docs]
62
+
58
63
## [grpcpool]
59
64
grpcpool is a pool of grpc.ClientConns that can be used to make requests to a grpc server. It implements grpc.ClientConnInterface to enable it to be used directly with generated proto stubs.
60
65
@@ -93,4 +98,6 @@ Documentation can be found at [data-builder-docs]
Copy file name to clipboardExpand all lines: howto/signals.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,17 +31,18 @@ When the application receives a signal, ColdBrew executes a multi-step shutdown
31
31
32
32
1.**`FailCheck(true)`** on services implementing [CBGracefulStopper] — `/readycheck` starts returning failure
33
33
2.**Wait**`GRPC_GRACEFUL_DURATION_IN_SECONDS` (default: 7s) for the load balancer to stop sending traffic
34
-
3.**Shutdown HTTP server** — stop accepting new HTTP requests
35
-
4.**`GracefulStop()` gRPC server** — finish in-flight RPCs, reject new ones
36
-
5.**Force-stop gRPC server** if graceful shutdown didn't complete in time
37
-
6.**`Stop()`** on services implementing [CBStopper] — resource cleanup
38
-
7.**Exit**
34
+
3.**Shutdown admin server** if configured (`ADMIN_PORT`)
35
+
4.**Shutdown HTTP server** — stop accepting new HTTP requests
36
+
5.**`GracefulStop()` gRPC server** — finish in-flight RPCs, reject new ones
37
+
6.**Force-stop gRPC server** if graceful shutdown didn't complete in time
38
+
7.**`Stop()`** on services implementing [CBStopper] — resource cleanup
39
+
8.**Exit**
39
40
40
41
## Customizing the shutdown process
41
42
42
43
Configuring the shutdown process is done by setting the [config] values:
43
44
44
-
-`SHUTDOWN_DURATION_IN_SECONDS` - Timeout for the entire `Stop()` sequence (default: 15s), covering steps 2-7 above including the drain wait. After this, the process exits regardless.
45
+
-`SHUTDOWN_DURATION_IN_SECONDS` - Timeout for the entire `Stop()` sequence (default: 15s), covering steps 2-8 above including the drain wait. After this, the process exits regardless.
45
46
-`GRPC_GRACEFUL_DURATION_IN_SECONDS` - Duration of step 2 — how long to wait after failing `/readycheck` before stopping servers (default: 7s). This is **included within**`SHUTDOWN_DURATION_IN_SECONDS`, not additional to it.
46
47
-`DISABLE_SIGNAL_HANDLER` - If set to `true`, ColdBrew will not register a signal handler (useful when you want to handle signals yourself).
0 commit comments