feat: add GrpcPort config to NodeOptions with startup validation

This commit is contained in:
Joseph Doherty
2026-03-21 11:42:41 -04:00
parent deb58e1f17
commit 64ee316609
4 changed files with 44 additions and 1 deletions

View File

@@ -42,6 +42,10 @@ public static class StartupValidator
if (role == "Site")
{
var grpcPortStr = nodeSection["GrpcPort"];
if (grpcPortStr != null && (!int.TryParse(grpcPortStr, out var gp) || gp < 1 || gp > 65535))
errors.Add("ScadaLink:Node:GrpcPort must be 1-65535");
var dbSection = configuration.GetSection("ScadaLink:Database");
if (string.IsNullOrEmpty(dbSection["SiteDbPath"]))
errors.Add("ScadaLink:Database:SiteDbPath required for Site nodes");