Application start deadline handling
★ 0.0 (0 ratings)60 min0 engineers solved this
Your assignment
This Go library builds an application from constructors (Provide), functions run at startup (Invoke), and lifecycle hooks registered through the Lifecycle interface. Calling Start(ctx) runs every OnStart hook in registration order under the given context and an optional start timeout, then returns an error on failure. Stop(ctx) runs the matching OnStop hooks in reverse order. Each hook execution is reported to a pluggable fxevent logger, which prints the hook events to the console. Hook helpers such as StartHook and StartStopHook wrap plain functions into hooks. The internal lifecycle package tracks hook execution and timing, and the top-level app.go coordinates startup, timeouts and shutdown.
What the team is seeing
When a service takes too long to start and the startup time limit runs out, the error printed on the console is a long, confusing block of text with a list of internal timings. Operators say it looks like a crash dump, even though the failure is an ordinary timeout.
Acceptance checks 1
- Check 1
Discussion is locked — log in and complete this problem to join the discussion and rate your experience.
