feat: add dependency shutdown and configurable service endpoints
This commit is contained in:
@@ -3,7 +3,14 @@
|
||||
This checked-in example uses a relative local framework replacement (`../..`).
|
||||
Run `go mod tidy && go run .` here. No external database or cloud account is required.
|
||||
The Go-only error catalog is `internal/apierrors/catalog.go`, registered by svc.
|
||||
The generated main and handlers are unmodified. Try:
|
||||
The generated main and handlers are unmodified. Built-in endpoint switches and
|
||||
paths are configured in etc/config.yaml under server.endpoints. Health replies
|
||||
use the project envelope by default; responseMode: raw opts out. Readiness
|
||||
failures stay HTTP 503, independently of business error status policies.
|
||||
|
||||
Dependencies can call svc.RequestShutdown(err); the generated entry drains
|
||||
requests, closes resources and retains the failure for a nonzero exit.
|
||||
Try:
|
||||
|
||||
```sh
|
||||
curl -i 'http://127.0.0.1:8080/check?kind=fixed'
|
||||
|
||||
Reference in New Issue
Block a user