Graceful shutdown
InitializeApp() observes SIGINT, SIGTERM, and SIGHUP. SDK components register cleanup routines as they are initialized.
Application resources can implement:
type Observer interface {
Close()
}
Register them with observer.Attach(resource).
Use observer.GetWaitGroup() for background goroutines and observer.WaitRunningTimeout() to wait up to WAIT_GROUP_TIMEOUT_SECONDS (90 seconds by default).
warning
SIGKILL cannot be intercepted. Keep consumers and operations idempotent.