feat(config): add startup_timeout option with context propagation (#739)

This commit is contained in:
Christoph
2026-09-01 23:05:50 +02:00
parent a2ee8d1e46
commit 3b5380852c
4 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -35,6 +35,7 @@ type App struct {
// Initialize creates a new App instance and initializes it.
func Initialize(
ctx context.Context,
cfg *config.Config,
wg WireGuardManager,
users UserManager,
@@ -46,7 +47,7 @@ func Initialize(
users: users,
}
startupContext, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
startupContext, cancel := context.WithTimeout(ctx, cfg.Advanced.StartupTimeout)
defer cancel()
// Switch to admin user context