Repository navigation
v0.2.0
Workers integration + lifecycle hooks
Add 5 optional interfaces for service lifecycle management, following the existing CBStopper/CBGracefulStopper pattern:
- CBWorkerProvider — run background workers managed by go-coldbrew/workers
- CBPreStarter — setup before servers start (DB connections, auth interceptors)
- CBPostStarter — act after server goroutines launch (service discovery)
- CBPreStopper — act before graceful shutdown (deregister, flush)
- CBPostStopper — final cleanup after everything stops
Lifecycle
PreStart → initGRPC → initHTTP → start workers → start servers → PostStart
→ block → PreStop → FailCheck → drain → stop workers → stop servers → Stop → PostStop
Config
- Added
env:""tags on all Config fields alongsideenvconfig:""for modern ecosystem compat - Added
Config.ValidateStrict() []errorfor programmatic validation
Other
- 100% backward compatible — CB interface unchanged, existing services work without modification
- Bumped
go-coldbrew/workersto v0.2.1