Revision: Rename to 'maglevd'; Refactor config structure
This commit is contained in:
@@ -43,7 +43,7 @@ func run() error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("load config: %w", err)
|
||||
}
|
||||
slog.Info("config-loaded", "path", *configPath, "vips", len(cfg.VIPs))
|
||||
slog.Info("config-loaded", "path", *configPath, "frontends", len(cfg.Frontends))
|
||||
|
||||
// ---- checker ------------------------------------------------------------
|
||||
chkr := checker.New(cfg)
|
||||
@@ -63,7 +63,7 @@ func run() error {
|
||||
return fmt.Errorf("listen %s: %w", *grpcAddr, err)
|
||||
}
|
||||
srv := grpc.NewServer()
|
||||
grpcapi.RegisterHealthCheckerServer(srv, grpcapi.NewServer(chkr))
|
||||
grpcapi.RegisterMaglevServer(srv, grpcapi.NewServer(chkr))
|
||||
slog.Info("grpc-listening", "addr", *grpcAddr)
|
||||
|
||||
go func() {
|
||||
@@ -89,7 +89,7 @@ func run() error {
|
||||
slog.Error("checker-reload-error", "err", err)
|
||||
continue
|
||||
}
|
||||
slog.Info("config-reload-done", "vips", len(newCfg.VIPs))
|
||||
slog.Info("config-reload-done", "frontends", len(newCfg.Frontends))
|
||||
|
||||
case syscall.SIGTERM, syscall.SIGINT:
|
||||
slog.Info("shutdown", "signal", sig)
|
||||
Reference in New Issue
Block a user