Skip to content

Commit 47ef6c3

Browse files
TJxiaobaozqr10159
andauthored
Reconfiguration scheduling (#11)
* add:The first version of the modified schedule * add:All protocols are initialized using the init function. --------- Co-authored-by: Logic <[email protected]>
1 parent 45df712 commit 47ef6c3

File tree

16 files changed

+1383
-483
lines changed

16 files changed

+1383
-483
lines changed

examples/main_simulation.go

Lines changed: 0 additions & 306 deletions
This file was deleted.

internal/cmd/server.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
"github.com/spf13/cobra"
3131

3232
bannerouter "hertzbeat.apache.org/hertzbeat-collector-go/internal/banner"
33+
"hertzbeat.apache.org/hertzbeat-collector-go/internal/collector/basic"
3334
jobserver "hertzbeat.apache.org/hertzbeat-collector-go/internal/collector/common/job"
3435
clrServer "hertzbeat.apache.org/hertzbeat-collector-go/internal/collector/common/server"
3536
transportserver "hertzbeat.apache.org/hertzbeat-collector-go/internal/collector/common/transport"
@@ -109,6 +110,11 @@ func server(ctx context.Context, logOut io.Writer) error {
109110

110111
func startRunners(ctx context.Context, cfg *clrServer.Server) error {
111112

113+
// Initialize all collectors before starting runners
114+
// This ensures all protocol collectors are registered and ready
115+
cfg.Logger.Info("Initializing collectors...")
116+
basic.InitializeAllCollectors(cfg.Logger)
117+
112118
runners := []struct {
113119
runner Runner[collectortypes.Info]
114120
}{

0 commit comments

Comments
 (0)