- Define GrpcPortOffset constant (10000) to replace magic numbers throughout
the code for better maintainability and consistency
- Extract bindIp determination logic into getBindIp() helper function
to eliminate code duplication between runMini and startMiniServices
- Remove redundant 'calculatedPort = calculatedPort' assignment that had no effect
- Update all gRPC port calculations to use GrpcPortOffset constant
(lines 489, 886 and the error logging at line 501)
glog.Errorf("Could not find available gRPC port for %s starting from %d, will use calculated %d and fail on binding",config.name,calculatedPort+1,calculatedPort)
calculatedPort=calculatedPort
}else{
calculatedPort=newPort
glog.Infof("gRPC port %d for %s is available, using it instead of calculated %d",newPort,config.name,*config.httpPort+10000)
glog.Infof("gRPC port %d for %s is available, using it instead of calculated %d",newPort,config.name,*config.httpPort+GrpcPortOffset)