mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 15:06:36 +08:00
refactor(bootstrap): move runtime init from router to cmd layer
Extract SyncEvents and InitLogWriter from router.Serve into bootstrap.Init called from cmd entry points with trace-aware context. Preserve existing Register* wiring for task and push domain integrations.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// Copyright 2026 Arctel.net
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/Rain-kl/Wavelet/internal/bootstrap"
|
||||
"github.com/Rain-kl/Wavelet/pkg/trace"
|
||||
)
|
||||
|
||||
func runBootstrap(opts bootstrap.Options) {
|
||||
ctx, span := trace.Start(context.Background(), "bootstrap.Init")
|
||||
defer span.End()
|
||||
bootstrap.Init(ctx, opts)
|
||||
}
|
||||
Reference in New Issue
Block a user