@nsshunt/stsappframework 3.1.213 → 3.1.215
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonTypes.js.map +1 -1
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/dist/masterprocessbase.js +33 -46
- package/dist/masterprocessbase.js.map +1 -1
- package/dist/processbase.js +29 -0
- package/dist/processbase.js.map +1 -1
- package/dist/serverprocessbase.js +51 -66
- package/dist/serverprocessbase.js.map +1 -1
- package/dist/stscontrollerbase.js.map +1 -1
- package/dist/{server.js → stsexpressserver.js} +1 -1
- package/dist/stsexpressserver.js.map +1 -0
- package/dist/stslatencycontroller.js.map +1 -1
- package/dist/stslatencyroute.js.map +1 -1
- package/dist/stsrouterbase.js.map +1 -1
- package/dist/vitesttesting/appSingleWSS.js +2 -1
- package/dist/vitesttesting/appSingleWSS.js.map +1 -1
- package/dist/workerprocessbase.js.map +1 -1
- package/package.json +5 -6
- package/src/commonTypes.ts +2 -0
- package/src/index.ts +1 -7
- package/src/masterprocessbase.ts +42 -55
- package/src/processbase.ts +32 -1
- package/src/serverprocessbase.ts +55 -72
- package/src/{socketIoServerHelper.ts → socketIoServerHelper.ts_bak} +1 -2
- package/src/stscontrollerbase.ts +1 -2
- package/src/{server.ts → stsexpressserver.ts} +1 -2
- package/src/stslatencycontroller.ts +1 -2
- package/src/stslatencyroute.ts +1 -2
- package/src/stsrouterbase.ts +1 -2
- package/src/vitesttesting/appSingleWSS.ts +2 -1
- package/src/workerprocessbase.ts +1 -2
- package/types/commonTypes.d.ts +0 -15
- package/types/commonTypes.d.ts.map +1 -1
- package/types/index.d.ts +0 -7
- package/types/index.d.ts.map +1 -1
- package/types/masterprocessbase.d.ts.map +1 -1
- package/types/processbase.d.ts +3 -0
- package/types/processbase.d.ts.map +1 -1
- package/types/serverprocessbase.d.ts +3 -1
- package/types/serverprocessbase.d.ts.map +1 -1
- package/types/stscontrollerbase.d.ts.map +1 -1
- package/types/{server.d.ts → stsexpressserver.d.ts} +1 -1
- package/types/stsexpressserver.d.ts.map +1 -0
- package/types/stslatencycontroller.d.ts.map +1 -1
- package/types/stslatencyroute.d.ts.map +1 -1
- package/types/stsrouterbase.d.ts.map +1 -1
- package/types/vitesttesting/appSingleWSS.d.ts.map +1 -1
- package/types/workerprocessbase.d.ts.map +1 -1
- package/dist/authDefs.js +0 -33
- package/dist/authDefs.js.map +0 -1
- package/dist/gRPC/ststest/protos/auth_sample.js +0 -3
- package/dist/gRPC/ststest/protos/auth_sample.js.map +0 -1
- package/dist/gRPC/ststest/protos/echo.js +0 -3
- package/dist/gRPC/ststest/protos/echo.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/examples/echo/Echo.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/examples/echo/Echo.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/testing/Request.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/testing/Request.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/testing/Response.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/testing/Response.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/testing/TestService.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/testing/TestService.js.map +0 -1
- package/dist/gRPC/ststest/protos/hellostreamingworld/HelloReply.js +0 -4
- package/dist/gRPC/ststest/protos/hellostreamingworld/HelloReply.js.map +0 -1
- package/dist/gRPC/ststest/protos/hellostreamingworld/HelloRequest.js +0 -4
- package/dist/gRPC/ststest/protos/hellostreamingworld/HelloRequest.js.map +0 -1
- package/dist/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.js +0 -4
- package/dist/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.js.map +0 -1
- package/dist/gRPC/ststest/protos/hellostreamingworld.js +0 -3
- package/dist/gRPC/ststest/protos/hellostreamingworld.js.map +0 -1
- package/dist/gRPC/ststest/protos/helloworld/Greeter.js +0 -4
- package/dist/gRPC/ststest/protos/helloworld/Greeter.js.map +0 -1
- package/dist/gRPC/ststest/protos/helloworld/HelloReply.js +0 -4
- package/dist/gRPC/ststest/protos/helloworld/HelloReply.js.map +0 -1
- package/dist/gRPC/ststest/protos/helloworld/HelloRequest.js +0 -4
- package/dist/gRPC/ststest/protos/helloworld/HelloRequest.js.map +0 -1
- package/dist/gRPC/ststest/protos/helloworld.js +0 -3
- package/dist/gRPC/ststest/protos/helloworld.js.map +0 -1
- package/dist/gRPC/ststest/protos/keyvaluestore/KeyValueStore.js +0 -4
- package/dist/gRPC/ststest/protos/keyvaluestore/KeyValueStore.js.map +0 -1
- package/dist/gRPC/ststest/protos/keyvaluestore/Request.js +0 -4
- package/dist/gRPC/ststest/protos/keyvaluestore/Request.js.map +0 -1
- package/dist/gRPC/ststest/protos/keyvaluestore/Response.js +0 -4
- package/dist/gRPC/ststest/protos/keyvaluestore/Response.js.map +0 -1
- package/dist/gRPC/ststest/protos/keyvaluestore.js +0 -3
- package/dist/gRPC/ststest/protos/keyvaluestore.js.map +0 -1
- package/dist/gRPC/ststest/protos/route_guide.js +0 -3
- package/dist/gRPC/ststest/protos/route_guide.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/Feature.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/Feature.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/Point.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/Point.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/Rectangle.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/Rectangle.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/RouteGuide.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/RouteGuide.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/RouteNote.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/RouteNote.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/RouteSummary.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/RouteSummary.js.map +0 -1
- package/dist/gRPC/ststest/src/commonTypes.js +0 -3
- package/dist/gRPC/ststest/src/commonTypes.js.map +0 -1
- package/dist/gRPC/ststest/src/greeter_client.js +0 -67
- package/dist/gRPC/ststest/src/greeter_client.js.map +0 -1
- package/dist/gRPC/ststest/src/greeter_server.js +0 -78
- package/dist/gRPC/ststest/src/greeter_server.js.map +0 -1
- package/dist/gRPC/ststest/src/route_guide_client.js +0 -258
- package/dist/gRPC/ststest/src/route_guide_client.js.map +0 -1
- package/dist/gRPC/ststest/src/route_guide_server.js +0 -237
- package/dist/gRPC/ststest/src/route_guide_server.js.map +0 -1
- package/dist/gRPC/ststest/src/route_guide_server2.js +0 -205
- package/dist/gRPC/ststest/src/route_guide_server2.js.map +0 -1
- package/dist/influxdb/influxDBManager.js +0 -304
- package/dist/influxdb/influxDBManager.js.map +0 -1
- package/dist/influxdb/influxDBManagerAgent.js +0 -14
- package/dist/influxdb/influxDBManagerAgent.js.map +0 -1
- package/dist/influxdb/influxDBManagerBase.js +0 -100
- package/dist/influxdb/influxDBManagerBase.js.map +0 -1
- package/dist/influxdb/influxDBManagerLambda.js +0 -17
- package/dist/influxdb/influxDBManagerLambda.js.map +0 -1
- package/dist/influxdb/influxDBManagerService.js +0 -14
- package/dist/influxdb/influxDBManagerService.js.map +0 -1
- package/dist/publishInstrumentsWebWorker.js +0 -159
- package/dist/publishInstrumentsWebWorker.js.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/socketIoServerHelper.js +0 -125
- package/dist/socketIoServerHelper.js.map +0 -1
- package/dist/tcpclient/app.js +0 -23
- package/dist/tcpclient/app.js.map +0 -1
- package/dist/tcpclient/app2.js +0 -57
- package/dist/tcpclient/app2.js.map +0 -1
- package/dist/tcpserver/app.js +0 -16
- package/dist/tcpserver/app.js.map +0 -1
- package/dist/tcpserver/appConfig.js +0 -83
- package/dist/tcpserver/appConfig.js.map +0 -1
- package/dist/tcpserver/appmaster.js +0 -446
- package/dist/tcpserver/appmaster.js.map +0 -1
- package/dist/testertesting/app.js +0 -284
- package/dist/testertesting/app.js.map +0 -1
- package/dist/testertesting/commonTypes.js +0 -47
- package/dist/testertesting/commonTypes.js.map +0 -1
- package/dist/testertesting/telemetryProcessor.js +0 -111
- package/dist/testertesting/telemetryProcessor.js.map +0 -1
- package/dist/testertesting/testCase01.js +0 -169
- package/dist/testertesting/testCase01.js.map +0 -1
- package/dist/testertesting/workerInstance.js +0 -263
- package/dist/testertesting/workerInstance.js.map +0 -1
- package/dist/testertesting/workerManager.js +0 -450
- package/dist/testertesting/workerManager.js.map +0 -1
- package/dist/testertesting/workerWorkerTestRunner01.js +0 -35
- package/dist/testertesting/workerWorkerTestRunner01.js.map +0 -1
- package/dist/testing/app.js +0 -18
- package/dist/testing/app.js.map +0 -1
- package/dist/testing/appConfig.js +0 -93
- package/dist/testing/appConfig.js.map +0 -1
- package/dist/testing/appTinyEmitter.js +0 -37
- package/dist/testing/appTinyEmitter.js.map +0 -1
- package/dist/testing/appWorkerWSS.js +0 -151
- package/dist/testing/appWorkerWSS.js.map +0 -1
- package/dist/testing/appredistest.js +0 -239
- package/dist/testing/appredistest.js.map +0 -1
- package/dist/testing/appsolo.js +0 -67
- package/dist/testing/appsolo.js.map +0 -1
- package/dist/testing/promiseTesting.js +0 -77
- package/dist/testing/promiseTesting.js.map +0 -1
- package/dist/testing/server.js +0 -15
- package/dist/testing/server.js.map +0 -1
- package/dist/testing/wsevents.js +0 -3
- package/dist/testing/wsevents.js.map +0 -1
- package/dist/webworkertesting/app.js +0 -44
- package/dist/webworkertesting/app.js.map +0 -1
- package/dist/webworkertesting/worker.js +0 -21
- package/dist/webworkertesting/worker.js.map +0 -1
- package/src/authDefs.ts +0 -37
- package/src/gRPC/ststest/protos/BUILD +0 -82
- package/src/gRPC/ststest/protos/README.md +0 -8
- package/src/gRPC/ststest/protos/auth_sample.proto +0 -42
- package/src/gRPC/ststest/protos/auth_sample.ts +0 -20
- package/src/gRPC/ststest/protos/echo.proto +0 -45
- package/src/gRPC/ststest/protos/echo.ts +0 -22
- package/src/gRPC/ststest/protos/grpc/examples/echo/Echo.ts +0 -55
- package/src/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.ts +0 -10
- package/src/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.ts +0 -10
- package/src/gRPC/ststest/protos/grpc/testing/Request.ts +0 -12
- package/src/gRPC/ststest/protos/grpc/testing/Response.ts +0 -12
- package/src/gRPC/ststest/protos/grpc/testing/TestService.ts +0 -27
- package/src/gRPC/ststest/protos/hellostreamingworld/HelloReply.ts +0 -10
- package/src/gRPC/ststest/protos/hellostreamingworld/HelloRequest.ts +0 -12
- package/src/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.ts +0 -23
- package/src/gRPC/ststest/protos/hellostreamingworld.proto +0 -39
- package/src/gRPC/ststest/protos/hellostreamingworld.ts +0 -18
- package/src/gRPC/ststest/protos/helloworld/Greeter.ts +0 -35
- package/src/gRPC/ststest/protos/helloworld/HelloReply.ts +0 -10
- package/src/gRPC/ststest/protos/helloworld/HelloRequest.ts +0 -10
- package/src/gRPC/ststest/protos/helloworld.proto +0 -40
- package/src/gRPC/ststest/protos/helloworld.ts +0 -18
- package/src/gRPC/ststest/protos/keyvaluestore/KeyValueStore.ts +0 -23
- package/src/gRPC/ststest/protos/keyvaluestore/Request.ts +0 -10
- package/src/gRPC/ststest/protos/keyvaluestore/Response.ts +0 -10
- package/src/gRPC/ststest/protos/keyvaluestore.proto +0 -33
- package/src/gRPC/ststest/protos/keyvaluestore.ts +0 -18
- package/src/gRPC/ststest/protos/route_guide.proto +0 -111
- package/src/gRPC/ststest/protos/route_guide.ts +0 -21
- package/src/gRPC/ststest/protos/routeguide/Feature.ts +0 -13
- package/src/gRPC/ststest/protos/routeguide/Point.ts +0 -12
- package/src/gRPC/ststest/protos/routeguide/Rectangle.ts +0 -13
- package/src/gRPC/ststest/protos/routeguide/RouteGuide.ts +0 -58
- package/src/gRPC/ststest/protos/routeguide/RouteNote.ts +0 -13
- package/src/gRPC/ststest/protos/routeguide/RouteSummary.ts +0 -16
- package/src/gRPC/ststest/src/commonTypes.ts +0 -27
- package/src/gRPC/ststest/src/greeter_client.ts +0 -52
- package/src/gRPC/ststest/src/greeter_server.ts +0 -62
- package/src/gRPC/ststest/src/route_guide_client.ts +0 -266
- package/src/gRPC/ststest/src/route_guide_server.ts +0 -234
- package/src/gRPC/ststest/src/route_guide_server2.ts +0 -211
- package/src/influxdb/influxDBManager.ts +0 -334
- package/src/influxdb/influxDBManagerAgent.ts +0 -14
- package/src/influxdb/influxDBManagerBase.ts +0 -108
- package/src/influxdb/influxDBManagerLambda.ts +0 -17
- package/src/influxdb/influxDBManagerService.ts +0 -14
- package/src/publishInstrumentsWebWorker.ts +0 -157
- package/src/tcpclient/app.ts +0 -21
- package/src/tcpclient/app2.ts +0 -58
- package/src/tcpserver/app.ts +0 -11
- package/src/tcpserver/appConfig.ts +0 -99
- package/src/tcpserver/appmaster.ts +0 -503
- package/src/testertesting/app.ts +0 -349
- package/src/testertesting/commonTypes.ts +0 -236
- package/src/testertesting/telemetryProcessor.ts +0 -125
- package/src/testertesting/testCase01.ts +0 -207
- package/src/testertesting/workerInstance.ts +0 -297
- package/src/testertesting/workerManager.ts +0 -511
- package/src/testertesting/workerWorkerTestRunner01.ts +0 -34
- package/src/testing/app.ts +0 -14
- package/src/testing/appConfig.ts +0 -110
- package/src/testing/appTinyEmitter.ts +0 -57
- package/src/testing/appWorkerWSS.ts +0 -174
- package/src/testing/appredistest.ts +0 -304
- package/src/testing/appsolo.ts +0 -96
- package/src/testing/docker-compose.yml +0 -20
- package/src/testing/promiseTesting.ts +0 -86
- package/src/testing/server.ts +0 -17
- package/src/testing/wsevents.ts +0 -33
- package/src/webworkertesting/app.ts +0 -56
- package/src/webworkertesting/worker.ts +0 -24
- package/types/authDefs.d.ts +0 -29
- package/types/authDefs.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/auth_sample.d.ts +0 -19
- package/types/gRPC/ststest/protos/auth_sample.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/echo.d.ts +0 -21
- package/types/gRPC/ststest/protos/echo.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/examples/echo/Echo.d.ts +0 -43
- package/types/gRPC/ststest/protos/grpc/examples/echo/Echo.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.d.ts +0 -7
- package/types/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.d.ts +0 -7
- package/types/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/testing/Request.d.ts +0 -9
- package/types/gRPC/ststest/protos/grpc/testing/Request.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/testing/Response.d.ts +0 -9
- package/types/gRPC/ststest/protos/grpc/testing/Response.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/testing/TestService.d.ts +0 -21
- package/types/gRPC/ststest/protos/grpc/testing/TestService.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/hellostreamingworld/HelloReply.d.ts +0 -7
- package/types/gRPC/ststest/protos/hellostreamingworld/HelloReply.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/hellostreamingworld/HelloRequest.d.ts +0 -9
- package/types/gRPC/ststest/protos/hellostreamingworld/HelloRequest.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.d.ts +0 -17
- package/types/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/hellostreamingworld.d.ts +0 -17
- package/types/gRPC/ststest/protos/hellostreamingworld.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/helloworld/Greeter.d.ts +0 -27
- package/types/gRPC/ststest/protos/helloworld/Greeter.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/helloworld/HelloReply.d.ts +0 -7
- package/types/gRPC/ststest/protos/helloworld/HelloReply.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/helloworld/HelloRequest.d.ts +0 -7
- package/types/gRPC/ststest/protos/helloworld/HelloRequest.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/helloworld.d.ts +0 -17
- package/types/gRPC/ststest/protos/helloworld.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/keyvaluestore/KeyValueStore.d.ts +0 -17
- package/types/gRPC/ststest/protos/keyvaluestore/KeyValueStore.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/keyvaluestore/Request.d.ts +0 -7
- package/types/gRPC/ststest/protos/keyvaluestore/Request.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/keyvaluestore/Response.d.ts +0 -7
- package/types/gRPC/ststest/protos/keyvaluestore/Response.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/keyvaluestore.d.ts +0 -17
- package/types/gRPC/ststest/protos/keyvaluestore.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/route_guide.d.ts +0 -20
- package/types/gRPC/ststest/protos/route_guide.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/Feature.d.ts +0 -10
- package/types/gRPC/ststest/protos/routeguide/Feature.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/Point.d.ts +0 -9
- package/types/gRPC/ststest/protos/routeguide/Point.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/Rectangle.d.ts +0 -10
- package/types/gRPC/ststest/protos/routeguide/Rectangle.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/RouteGuide.d.ts +0 -46
- package/types/gRPC/ststest/protos/routeguide/RouteGuide.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/RouteNote.d.ts +0 -10
- package/types/gRPC/ststest/protos/routeguide/RouteNote.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/RouteSummary.d.ts +0 -13
- package/types/gRPC/ststest/protos/routeguide/RouteSummary.d.ts.map +0 -1
- package/types/gRPC/ststest/src/commonTypes.d.ts +0 -23
- package/types/gRPC/ststest/src/commonTypes.d.ts.map +0 -1
- package/types/gRPC/ststest/src/greeter_client.d.ts +0 -3
- package/types/gRPC/ststest/src/greeter_client.d.ts.map +0 -1
- package/types/gRPC/ststest/src/greeter_server.d.ts +0 -3
- package/types/gRPC/ststest/src/greeter_server.d.ts.map +0 -1
- package/types/gRPC/ststest/src/route_guide_client.d.ts +0 -3
- package/types/gRPC/ststest/src/route_guide_client.d.ts.map +0 -1
- package/types/gRPC/ststest/src/route_guide_server.d.ts +0 -3
- package/types/gRPC/ststest/src/route_guide_server.d.ts.map +0 -1
- package/types/gRPC/ststest/src/route_guide_server2.d.ts +0 -3
- package/types/gRPC/ststest/src/route_guide_server2.d.ts.map +0 -1
- package/types/influxdb/influxDBManager.d.ts +0 -21
- package/types/influxdb/influxDBManager.d.ts.map +0 -1
- package/types/influxdb/influxDBManagerAgent.d.ts +0 -8
- package/types/influxdb/influxDBManagerAgent.d.ts.map +0 -1
- package/types/influxdb/influxDBManagerBase.d.ts +0 -14
- package/types/influxdb/influxDBManagerBase.d.ts.map +0 -1
- package/types/influxdb/influxDBManagerLambda.d.ts +0 -11
- package/types/influxdb/influxDBManagerLambda.d.ts.map +0 -1
- package/types/influxdb/influxDBManagerService.d.ts +0 -8
- package/types/influxdb/influxDBManagerService.d.ts.map +0 -1
- package/types/publishInstrumentsWebWorker.d.ts +0 -1
- package/types/publishInstrumentsWebWorker.d.ts.map +0 -1
- package/types/server.d.ts.map +0 -1
- package/types/socketIoServerHelper.d.ts +0 -20
- package/types/socketIoServerHelper.d.ts.map +0 -1
- package/types/tcpclient/app.d.ts +0 -2
- package/types/tcpclient/app.d.ts.map +0 -1
- package/types/tcpclient/app2.d.ts +0 -2
- package/types/tcpclient/app2.d.ts.map +0 -1
- package/types/tcpserver/app.d.ts +0 -2
- package/types/tcpserver/app.d.ts.map +0 -1
- package/types/tcpserver/appConfig.d.ts +0 -3
- package/types/tcpserver/appConfig.d.ts.map +0 -1
- package/types/tcpserver/appmaster.d.ts +0 -24
- package/types/tcpserver/appmaster.d.ts.map +0 -1
- package/types/testertesting/app.d.ts +0 -2
- package/types/testertesting/app.d.ts.map +0 -1
- package/types/testertesting/commonTypes.d.ts +0 -215
- package/types/testertesting/commonTypes.d.ts.map +0 -1
- package/types/testertesting/telemetryProcessor.d.ts +0 -6
- package/types/testertesting/telemetryProcessor.d.ts.map +0 -1
- package/types/testertesting/testCase01.d.ts +0 -20
- package/types/testertesting/testCase01.d.ts.map +0 -1
- package/types/testertesting/workerInstance.d.ts +0 -23
- package/types/testertesting/workerInstance.d.ts.map +0 -1
- package/types/testertesting/workerManager.d.ts +0 -16
- package/types/testertesting/workerManager.d.ts.map +0 -1
- package/types/testertesting/workerWorkerTestRunner01.d.ts +0 -7
- package/types/testertesting/workerWorkerTestRunner01.d.ts.map +0 -1
- package/types/testing/app.d.ts +0 -2
- package/types/testing/app.d.ts.map +0 -1
- package/types/testing/appConfig.d.ts +0 -3
- package/types/testing/appConfig.d.ts.map +0 -1
- package/types/testing/appTinyEmitter.d.ts +0 -2
- package/types/testing/appTinyEmitter.d.ts.map +0 -1
- package/types/testing/appWorkerWSS.d.ts +0 -26
- package/types/testing/appWorkerWSS.d.ts.map +0 -1
- package/types/testing/appredistest.d.ts +0 -4
- package/types/testing/appredistest.d.ts.map +0 -1
- package/types/testing/appsolo.d.ts +0 -3
- package/types/testing/appsolo.d.ts.map +0 -1
- package/types/testing/promiseTesting.d.ts +0 -4
- package/types/testing/promiseTesting.d.ts.map +0 -1
- package/types/testing/server.d.ts +0 -6
- package/types/testing/server.d.ts.map +0 -1
- package/types/testing/wsevents.d.ts +0 -18
- package/types/testing/wsevents.d.ts.map +0 -1
- package/types/webworkertesting/app.d.ts +0 -2
- package/types/webworkertesting/app.d.ts.map +0 -1
- package/types/webworkertesting/worker.d.ts +0 -2
- package/types/webworkertesting/worker.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stslatencyroute.js","sourceRoot":"","sources":["../src/stslatencyroute.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAC/C,iEAA6D;AAG7D,MAAa,eAAgB,SAAQ,6BAAa;
|
|
1
|
+
{"version":3,"file":"stslatencyroute.js","sourceRoot":"","sources":["../src/stslatencyroute.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAC/C,iEAA6D;AAG7D,MAAa,eAAgB,SAAQ,6BAAa;IAC9C,YAAY,MAAoB;QAE5B,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,MAAM,iBAAiB,GAAG,IAAI,2CAAoB,CAAC,MAAM,CAAC,CAAC;QAC3D,MAAM,EAAE,UAAU,EAAE,GAAG,iBAAiB,CAAC;QAEzC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,kBAAkB;IACvF,CAAC;CACJ;AAVD,0CAUC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stsrouterbase.js","sourceRoot":"","sources":["../src/stsrouterbase.ts"],"names":[],"mappings":";;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,qCAAiC;AAGjC,MAAsB,aAAa;
|
|
1
|
+
{"version":3,"file":"stsrouterbase.js","sourceRoot":"","sources":["../src/stsrouterbase.ts"],"names":[],"mappings":";;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,qCAAiC;AAGjC,MAAsB,aAAa;IAC/B,OAAO,CAAS;IAChB,OAAO,CAAM;IAEb,YAAY,MAAoB;QAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAA,gBAAM,GAAE,CAAC;IAC5B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAA;IACvB,CAAC;CACJ;AAhBD,sCAgBC"}
|
|
@@ -7,10 +7,11 @@ exports.AppSingleWSS = void 0;
|
|
|
7
7
|
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
9
|
const index_1 = require("./../index");
|
|
10
|
+
const stsobservability_1 = require("@nsshunt/stsobservability");
|
|
10
11
|
class AppSingleWSS extends index_1.SingleProcessBase {
|
|
11
12
|
constructor(options) {
|
|
12
13
|
super(options);
|
|
13
|
-
this.socketIoServerHelper = new
|
|
14
|
+
this.socketIoServerHelper = new stsobservability_1.SocketIoServerHelper({
|
|
14
15
|
logger: this.options.logger
|
|
15
16
|
});
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appSingleWSS.js","sourceRoot":"","sources":["../../src/vitesttesting/appSingleWSS.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,kDAA0B;AAE1B,
|
|
1
|
+
{"version":3,"file":"appSingleWSS.js","sourceRoot":"","sources":["../../src/vitesttesting/appSingleWSS.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,kDAA0B;AAE1B,sCAA2G;AAC3G,gEAAgE;AAQhE,MAAa,YAAa,SAAQ,yBAAiB;IAE/C,YAAY,OAAuB;QAE/B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,oBAAoB,GAAG,IAAI,uCAAoB,CAA6C;YAC7F,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;SAC9B,CAAC,CAAC;IACP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BACH,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,GAAW,EAAE,EAAE,EAAE,EAAE;oBACrC,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;oBACpB,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACvB,CAAC,CAAC,CAAC;gBACH,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE;oBAC9B,EAAE,CAAC,EAAC,IAAI,EAAE,GAAG,GAAC,CAAC,EAAC,CAAC,CAAC;gBACtB,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAA;QACV,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAA;QACjF,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,mBAAmB;QACnB,IAAI,IAAI,CAAC,oBAAoB,KAAK,IAAI,EAAE,CAAC;YACrC,OAAO,IAAI,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,oBAAY,CAAC,UAAU,CAAC,CAAC;QACtF,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAlED,oCAkEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workerprocessbase.js","sourceRoot":"","sources":["../src/workerprocessbase.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,kDAA0B;AAE1B,gEAA2E;AAE3E,+CAAiI;AACjI,2DAAuD;AAEvD,+BAAoC;AAEpC,kDAA6C;AAE7C,0EAAkC,CAAC,gCAAgC;AACnE,uCAAoD;AAEpD;;;;GAIG;AACH,MAAa,iBAAkB,SAAQ,qCAAiB;
|
|
1
|
+
{"version":3,"file":"workerprocessbase.js","sourceRoot":"","sources":["../src/workerprocessbase.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,kDAA0B;AAE1B,gEAA2E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CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,6BAA6B,CAAC,CAAC,CAAC;wBAC9G,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;wBACjC,MAAM;oBACV,KAAK,SAAS;wBACV,8GAA8G;wBAC9G,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;wBACzC,MAAM;oBACV,KAAK,UAAU,CAAE,CAAC,iDAAiD;oBAC/D,aAAa;gBACjB,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;IAEO,gBAAgB;QACrB,kCAAkC;QAClC,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACpB,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,KAAK,CAAC,gBAAgB,EAAE,CAAC;IACpC,CAAC;CACJ;AA3MD,8CA2MC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nsshunt/stsappframework",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.215",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@types/jest": "^29.5.13",
|
|
38
38
|
"@types/jsonwebtoken": "^9.0.7",
|
|
39
39
|
"@types/uuid": "^10.0.0",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
41
|
-
"@typescript-eslint/parser": "^8.
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^8.10.0",
|
|
41
|
+
"@typescript-eslint/parser": "^8.10.0",
|
|
42
42
|
"eslint": "^9.11.1",
|
|
43
43
|
"globals": "^15.11.0",
|
|
44
44
|
"jest": "^29.7.0",
|
|
@@ -51,11 +51,10 @@
|
|
|
51
51
|
"@grpc/grpc-js": "^1.12.2",
|
|
52
52
|
"@grpc/proto-loader": "^0.7.13",
|
|
53
53
|
"@influxdata/influxdb-client": "^1.35.0",
|
|
54
|
-
"@influxdata/influxdb-client-apis": "^1.35.0",
|
|
55
54
|
"@nsshunt/stsconfig": "^1.25.149",
|
|
56
55
|
"@nsshunt/stsdatamanagement": "^1.18.78",
|
|
57
|
-
"@nsshunt/stsmessaging": "^1.0.
|
|
58
|
-
"@nsshunt/stsobservability": "^1.0.
|
|
56
|
+
"@nsshunt/stsmessaging": "^1.0.9",
|
|
57
|
+
"@nsshunt/stsobservability": "^1.0.71",
|
|
59
58
|
"@nsshunt/stsutils": "^1.16.86",
|
|
60
59
|
"@socket.io/cluster-adapter": "^0.2.2",
|
|
61
60
|
"@socket.io/redis-streams-adapter": "^0.2.2",
|
package/src/commonTypes.ts
CHANGED
|
@@ -255,6 +255,7 @@ export interface ISocketIoServerHelper<ClientToServerEvents extends STSDefaultCl
|
|
|
255
255
|
SetupEvent(event: ClientToServerEvents, eventCb: ServerEventCb): ISocketIoServerHelper<ClientToServerEvents, ServerToClientEvents>
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
/*
|
|
258
259
|
export interface IInfluxDBManagerOptions {
|
|
259
260
|
token: string // API access token
|
|
260
261
|
url: string // end-pont for API
|
|
@@ -270,6 +271,7 @@ export interface IInfluxDBManagerOptions {
|
|
|
270
271
|
}
|
|
271
272
|
logger: ISTSLogger
|
|
272
273
|
}
|
|
274
|
+
*/
|
|
273
275
|
|
|
274
276
|
export type ConsumeMessageCB = (topic: string, partition: number, message: KafkaMessage, heartbeat: () => Promise<void>, pause: () => () => void) => void;
|
|
275
277
|
export type ConsumeMessageErrorCB = (error: any) => void;
|
package/src/index.ts
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
export * from './commonTypes'
|
|
2
|
-
export * from './authDefs'
|
|
3
2
|
export * from './authutilsnode'
|
|
4
3
|
export * from './stsrouterbase'
|
|
5
4
|
export * from './stscontrollerbase'
|
|
6
5
|
export * from './singleprocessbase'
|
|
7
6
|
export * from './masterprocessbase'
|
|
8
7
|
export * from './workerprocessbase'
|
|
9
|
-
export * from './socketIoServerHelper'
|
|
8
|
+
//export * from './socketIoServerHelper'
|
|
10
9
|
export * from './stslatencycontroller'
|
|
11
10
|
export * from './stslatencyroute'
|
|
12
11
|
export * from './kafka/kafkamanager'
|
|
13
12
|
export * from './kafka/kafkaproducer'
|
|
14
13
|
export * from './kafka/kafkaconsumer'
|
|
15
|
-
export * from './influxdb/influxDBManager'
|
|
16
|
-
export * from './influxdb/influxDBManagerBase'
|
|
17
|
-
export * from './influxdb/influxDBManagerService'
|
|
18
|
-
export * from './influxdb/influxDBManagerAgent'
|
|
19
|
-
export * from './influxdb/influxDBManagerLambda'
|
|
20
14
|
export * from './publishertransports/publishTransportUtils'
|
|
21
15
|
export * from './stsTransportWinston'
|
|
22
16
|
export * from './stsTransportLoggerWinston'
|
package/src/masterprocessbase.ts
CHANGED
|
@@ -28,6 +28,8 @@ import { IPCMessagePayload, IPCMessageCommand } from './commonTypes'
|
|
|
28
28
|
|
|
29
29
|
import { STSTransportLoggerWinston } from './stsTransportLoggerWinston'
|
|
30
30
|
|
|
31
|
+
import { Sleep } from '@nsshunt/stsutils'
|
|
32
|
+
|
|
31
33
|
//import { GetFirstNetworkInterface } from './network';
|
|
32
34
|
|
|
33
35
|
export class MasterProcessBase extends ProcessBase implements IMasterProcessBase
|
|
@@ -291,7 +293,9 @@ export class MasterProcessBase extends ProcessBase implements IMasterProcessBase
|
|
|
291
293
|
}
|
|
292
294
|
|
|
293
295
|
KillWorkers = (signal: NodeJS.Signals, keepOne?: boolean): void => {
|
|
296
|
+
const logPrefix = `MasterProcessBase:KillWorkers():${process.pid}:`;
|
|
294
297
|
try {
|
|
298
|
+
this.LogInfoMessage(`${logPrefix} Killing Workers.`);
|
|
295
299
|
const keepOneAlive = (keepOne ? keepOne : false);
|
|
296
300
|
let skippedFirst = false;
|
|
297
301
|
const sortedIdList: number[] = [ ];
|
|
@@ -306,7 +310,7 @@ export class MasterProcessBase extends ProcessBase implements IMasterProcessBase
|
|
|
306
310
|
}
|
|
307
311
|
});
|
|
308
312
|
} catch (error) {
|
|
309
|
-
this.LogInfoMessage(chalk.red(
|
|
313
|
+
this.LogInfoMessage(chalk.red(`${logPrefix} signal: [${signal}], keepOne: [${keepOne}], error: [${error}]`));
|
|
310
314
|
}
|
|
311
315
|
}
|
|
312
316
|
|
|
@@ -520,6 +524,22 @@ export class MasterProcessBase extends ProcessBase implements IMasterProcessBase
|
|
|
520
524
|
}
|
|
521
525
|
});
|
|
522
526
|
|
|
527
|
+
const TerminateLatency = () => {
|
|
528
|
+
if (this.#checkLatency) {
|
|
529
|
+
clearInterval(this.#checkLatency);
|
|
530
|
+
this.#checkLatency = null;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const TerminateHTTPServer = async (): Promise<void> => {
|
|
535
|
+
if (this.#httpServer !== null) {
|
|
536
|
+
const logPrefix = `ServerProcessBase:TerminateHTTPServer():${process.pid}:`;
|
|
537
|
+
this.LogInfoMessage(`${logPrefix} Closing httpServer.`);
|
|
538
|
+
await this.#httpServer.close();
|
|
539
|
+
this.#httpServer = null;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
523
543
|
// Terminate in order;
|
|
524
544
|
// forked worker threads (send signal)
|
|
525
545
|
// De-Register service
|
|
@@ -527,73 +547,40 @@ export class MasterProcessBase extends ProcessBase implements IMasterProcessBase
|
|
|
527
547
|
// instrument timers (gauge etc.)
|
|
528
548
|
// publisher
|
|
529
549
|
// terminate UI (if loaded)
|
|
530
|
-
const Terminate = async (signal: any) =>
|
|
531
|
-
|
|
532
|
-
if (this.#shuttingDown === false)
|
|
533
|
-
{
|
|
550
|
+
const Terminate = async (signal: any): Promise<void> => {
|
|
551
|
+
const logPrefix = `MasterProcessBase:Terminate():${process.pid}:`;
|
|
552
|
+
if (this.#shuttingDown === false) {
|
|
534
553
|
this.#shuttingDown = true;
|
|
535
554
|
|
|
536
|
-
if (this.#checkLatency) {
|
|
537
|
-
clearInterval(this.#checkLatency);
|
|
538
|
-
this.#checkLatency = null;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
await this.ProcessTerminate();
|
|
542
|
-
|
|
543
|
-
if (this.GetUIController() !== null)
|
|
544
|
-
{
|
|
545
|
-
this.LogInfoMessage('Destroy the user interface controller.');
|
|
546
|
-
this.GetUIController().DestroyUI();
|
|
547
|
-
}
|
|
548
|
-
|
|
549
555
|
if (signal) {
|
|
550
|
-
this.LogInfoMessage(this.GetSignalColour(signal)(
|
|
556
|
+
this.LogInfoMessage(this.GetSignalColour(signal)(`${logPrefix} Received signal: ${signal}`));
|
|
551
557
|
} else {
|
|
552
|
-
this.LogInfoMessage(this.GetSignalColour(null)(
|
|
558
|
+
this.LogInfoMessage(this.GetSignalColour(null)(`${logPrefix} Received Terminate without signal.`));
|
|
553
559
|
}
|
|
554
560
|
|
|
555
|
-
|
|
556
|
-
//@@ De-register here ...
|
|
561
|
+
TerminateLatency();
|
|
557
562
|
|
|
558
|
-
|
|
559
|
-
this.LogInfoMessage(`Closing httpServer.`);
|
|
560
|
-
await this.#httpServer.close();
|
|
561
|
-
this.#httpServer = null;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
this.LogInfoMessage(`Stopping instruments.`);
|
|
565
|
-
//@@StopInstruments(this.instruments);
|
|
563
|
+
await this.ProcessTerminate();
|
|
566
564
|
|
|
567
|
-
|
|
565
|
+
this.TerminateUIController();
|
|
566
|
+
|
|
567
|
+
this.LogInfoMessage(`${logPrefix} De-Registering service.`);
|
|
568
|
+
//@@ De-register here ...
|
|
569
|
+
|
|
570
|
+
await TerminateHTTPServer();
|
|
568
571
|
|
|
569
|
-
this.LogInfoMessage('Killing Workers.');
|
|
570
572
|
this.KillWorkers(signal);
|
|
571
573
|
|
|
572
|
-
|
|
573
|
-
this.LogInfoMessage(`Ending database connections and pools.`);
|
|
574
|
-
await this.TerminateDatabase();
|
|
575
|
-
//await this.accessLayer.enddatabase();
|
|
576
|
-
}
|
|
574
|
+
await this.TerminateDatabase();
|
|
577
575
|
|
|
578
|
-
|
|
579
|
-
//if (this.InstrumentController && this.InstrumentController.Workers.length > 0) {
|
|
580
|
-
if (this.InstrumentController) {
|
|
581
|
-
this.LogInfoMessage(`Ending publisher.`);
|
|
582
|
-
setTimeout(() => {
|
|
583
|
-
if (this.InstrumentController) {
|
|
584
|
-
this.InstrumentController.EndPublish();
|
|
585
|
-
}
|
|
586
|
-
}, 100);
|
|
587
|
-
}
|
|
576
|
+
this.TerminateInstrumentController();
|
|
588
577
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
}
|
|
595
|
-
this.LogInfoMessage(`Performing process.exit(0) - Immediate.`);
|
|
596
|
-
}
|
|
578
|
+
await Sleep(1000);
|
|
579
|
+
|
|
580
|
+
this.ProcessExit(this.#childProcessExitTime + this.#masterProcessExitTime);
|
|
581
|
+
|
|
582
|
+
} else {
|
|
583
|
+
this.LogInfoMessage(`${logPrefix} Process already terminating.`);
|
|
597
584
|
}
|
|
598
585
|
}
|
|
599
586
|
|
package/src/processbase.ts
CHANGED
|
@@ -275,6 +275,28 @@ export abstract class ProcessBase extends TinyEmitter implements IProcessBase
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
+
ProcessExit = (processExitDelay: number) => {
|
|
279
|
+
if (this.options.processExitOnTerminate && this.options.processExitOnTerminate === true) {
|
|
280
|
+
setTimeout(() => {
|
|
281
|
+
this.LogInfoMessage(`Performing process.exit(0).`);
|
|
282
|
+
process.exit(0);
|
|
283
|
+
}, processExitDelay); // Give the workers time to terminate gracefully
|
|
284
|
+
} else {
|
|
285
|
+
this.LogInfoMessage(`Performing process.exit(0) - Immediate.`);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
TerminateInstrumentController = () => {
|
|
290
|
+
if (this.InstrumentController) {
|
|
291
|
+
this.LogInfoMessage(`ProcessBase:TerminateInstrumentController()`);
|
|
292
|
+
setTimeout(() => {
|
|
293
|
+
if (this.InstrumentController) {
|
|
294
|
+
this.InstrumentController.EndPublish();
|
|
295
|
+
}
|
|
296
|
+
}, 100);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
278
300
|
get InstrumentController(): PublishInstrumentController | null {
|
|
279
301
|
return this.#instrumentController;
|
|
280
302
|
}
|
|
@@ -287,6 +309,13 @@ export abstract class ProcessBase extends TinyEmitter implements IProcessBase
|
|
|
287
309
|
return false;
|
|
288
310
|
}
|
|
289
311
|
|
|
312
|
+
TerminateUIController = () => {
|
|
313
|
+
if (this.GetUIController() !== null) {
|
|
314
|
+
this.LogInfoMessage('ProcessBase:TerminateUIController(): Destroy the user interface controller.');
|
|
315
|
+
this.GetUIController().DestroyUI();
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
290
319
|
async ProcessTerminate(): Promise<void> {
|
|
291
320
|
this.emit('ProcessTerminate');
|
|
292
321
|
|
|
@@ -330,8 +359,10 @@ export abstract class ProcessBase extends TinyEmitter implements IProcessBase
|
|
|
330
359
|
} as InstrumentGaugeTelemetry);
|
|
331
360
|
}
|
|
332
361
|
|
|
333
|
-
async TerminateDatabase() {
|
|
362
|
+
async TerminateDatabase(): Promise<void> {
|
|
334
363
|
if (this.#accessLayer) {
|
|
364
|
+
const logPrefix = `ProcessBase:TerminateDatabase():${process.pid}:`;
|
|
365
|
+
this.LogInfoMessage(`${logPrefix} Ending database connections and pools.`);
|
|
335
366
|
this.#accessLayer.off(IDBAccessLayerEvents.UpdateInstruments, this.#UpdatePGPoolManagerInstrument)
|
|
336
367
|
await this.#accessLayer.EndDatabase();
|
|
337
368
|
}
|
package/src/serverprocessbase.ts
CHANGED
|
@@ -21,7 +21,7 @@ import tls from 'node:tls'
|
|
|
21
21
|
import net from 'node:net'
|
|
22
22
|
|
|
23
23
|
import { Server, ServerOptions } from "socket.io";
|
|
24
|
-
import { STSExpressServer } from './
|
|
24
|
+
import { STSExpressServer } from './stsexpressserver'
|
|
25
25
|
import { Express } from 'express'
|
|
26
26
|
|
|
27
27
|
import { createClient, RedisClientType } from 'redis';
|
|
@@ -221,8 +221,7 @@ export abstract class ServerProcessBase extends ProcessBase implements IServerPr
|
|
|
221
221
|
//@@httpServer.listen('/var/run/sts/stsrest01.sock').on('listening', () =>
|
|
222
222
|
this.#httpServer.listen(this.options.listenPort, () => {
|
|
223
223
|
//@@chmodSync(this.options.port, 511);
|
|
224
|
-
}).on('listening', () =>
|
|
225
|
-
{
|
|
224
|
+
}).on('listening', () => {
|
|
226
225
|
this.LogInfoMessage(`live on ${this.options.endpoint}:${this.options.listenPort}${this.options.apiRoot}`);
|
|
227
226
|
});
|
|
228
227
|
}
|
|
@@ -232,8 +231,7 @@ export abstract class ServerProcessBase extends ProcessBase implements IServerPr
|
|
|
232
231
|
this.#httpServer = tls.createServer(this.#GetTLSOptions(), this.#SetupTLSServer);
|
|
233
232
|
this.#httpServer.listen(this.options.listenPort, 'stscore.stsmda.org', () => {
|
|
234
233
|
this.LogInfoMessage('TCP Server is running on port ' + this.options.listenPort + '.');
|
|
235
|
-
}).on('listening', () =>
|
|
236
|
-
{
|
|
234
|
+
}).on('listening', () => {
|
|
237
235
|
this.LogInfoMessage(`TCP live on ${this.options.endpoint}:${this.options.listenPort}${this.options.apiRoot}`);
|
|
238
236
|
});
|
|
239
237
|
}
|
|
@@ -248,8 +246,7 @@ export abstract class ServerProcessBase extends ProcessBase implements IServerPr
|
|
|
248
246
|
(this.#httpServer as tls.Server).on('secureConnection', this.#SetupRPCServer);
|
|
249
247
|
this.#httpServer.listen(this.options.listenPort, 'stscore.stsmda.org', () => {
|
|
250
248
|
this.LogInfoMessage('JSON RPC 2.0 Server is running on port ' + this.options.listenPort + '.');
|
|
251
|
-
}).on('listening', () =>
|
|
252
|
-
{
|
|
249
|
+
}).on('listening', () => {
|
|
253
250
|
this.LogInfoMessage(`JSON RPC 2.0 live on ${this.options.endpoint}:${this.options.listenPort}${this.options.apiRoot}`);
|
|
254
251
|
});
|
|
255
252
|
}
|
|
@@ -258,6 +255,37 @@ export abstract class ServerProcessBase extends ProcessBase implements IServerPr
|
|
|
258
255
|
return this.#shuttingDown;
|
|
259
256
|
}
|
|
260
257
|
|
|
258
|
+
TerminateSocketIO = () => {
|
|
259
|
+
if (this.options.wssServer === true && this.#io !== null) {
|
|
260
|
+
const logPrefix = `ServerProcessBase:TerminateSockets():${process.pid}:`;
|
|
261
|
+
this.LogInfoMessage(`${logPrefix} Disconnect SocketIO Sockets.`);
|
|
262
|
+
if (this.socketIoServerHelper !== null) {
|
|
263
|
+
this.socketIoServerHelper.DisconnectSockets();
|
|
264
|
+
} else {
|
|
265
|
+
this.#io.disconnectSockets();
|
|
266
|
+
}
|
|
267
|
+
this.socketIoServerHelper = null;
|
|
268
|
+
this.#io = null;
|
|
269
|
+
// Note that this.#redisClient.disconnect() is not required becuase DisconnectSockets performs this action.
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
TerminateHTTPServer = async (): Promise<void> => {
|
|
274
|
+
const logPrefix = `ServerProcessBase:TerminateHTTPServer():${process.pid}:`;
|
|
275
|
+
if (this.#httpServer !== null) {
|
|
276
|
+
if (this.options.serverType === STSServerType.TCPRAW_TLS) {
|
|
277
|
+
this.#sockets.forEach((socket: net.Socket, index, array) => {
|
|
278
|
+
this.LogInfoMessage(chalk.yellow(`${logPrefix} TCP Socket destroy, remote address: [${socket.remoteAddress}], remote port: [${socket.remotePort}]`));
|
|
279
|
+
socket.destroy();
|
|
280
|
+
//socket.end();
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
this.LogInfoMessage(`${logPrefix} Closing httpServer.`);
|
|
284
|
+
await this.#httpServer.close();
|
|
285
|
+
this.#httpServer = null;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
261
289
|
// Terminate in order;
|
|
262
290
|
// forked worker threads (send signal)
|
|
263
291
|
// De-Register service
|
|
@@ -266,75 +294,37 @@ export abstract class ServerProcessBase extends ProcessBase implements IServerPr
|
|
|
266
294
|
// publisher
|
|
267
295
|
// terminate UI (if loaded)
|
|
268
296
|
Terminate = async (clusterPerformExit: boolean, signal?: any): Promise<void> => {
|
|
297
|
+
const logPrefix = `ServerProcessBase:Terminate():${process.pid}:`;
|
|
269
298
|
if (this.#shuttingDown === false) {
|
|
270
299
|
this.#shuttingDown = true;
|
|
271
300
|
|
|
301
|
+
if (signal) {
|
|
302
|
+
this.LogInfoMessage(this.GetSignalColour(signal)(`${logPrefix} Received signal: ${signal}`));
|
|
303
|
+
} else {
|
|
304
|
+
this.LogInfoMessage(this.GetSignalColour(null)(`${logPrefix} Received Terminate without signal.`));
|
|
305
|
+
}
|
|
306
|
+
|
|
272
307
|
await this.ProcessTerminate();
|
|
273
308
|
|
|
274
|
-
|
|
275
|
-
if (this.GetUIController() !== null)
|
|
276
|
-
{
|
|
277
|
-
this.LogInfoMessage('Destroy the user interface controller.');
|
|
278
|
-
this.GetUIController().DestroyUI();
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
if (signal) {
|
|
282
|
-
this.LogInfoMessage(this.GetSignalColour(signal)(`Main Process (singleprocess): ${process.pid} received signal: ${signal}`));
|
|
283
|
-
} else {
|
|
284
|
-
this.LogInfoMessage(this.GetSignalColour(null)(`Main Process (singleprocess): ${process.pid} received Terminate without signal.`));
|
|
285
|
-
}
|
|
286
|
-
}
|
|
309
|
+
this.TerminateUIController();
|
|
287
310
|
|
|
288
|
-
|
|
289
|
-
{
|
|
290
|
-
this.LogInfoMessage(`Disconnect Sockets.`);
|
|
291
|
-
if (this.socketIoServerHelper !== null) {
|
|
292
|
-
this.socketIoServerHelper.DisconnectSockets();
|
|
293
|
-
} else {
|
|
294
|
-
this.#io.disconnectSockets();
|
|
295
|
-
}
|
|
296
|
-
this.socketIoServerHelper = null;
|
|
297
|
-
this.#io = null;
|
|
298
|
-
// Note that this.#redisClient.disconnect() is not required becuase DisconnectSockets performs this action.
|
|
299
|
-
}
|
|
311
|
+
this.TerminateSocketIO();
|
|
300
312
|
|
|
301
|
-
|
|
302
|
-
if (this.options.serverType === STSServerType.TCPRAW_TLS) {
|
|
303
|
-
this.#sockets.forEach((socket: net.Socket, index, array) => {
|
|
304
|
-
this.LogInfoMessage(chalk.yellow(`TCP Socket destroy, remote address: [${socket.remoteAddress}], remote port: [${socket.remotePort}]`));
|
|
305
|
-
socket.destroy();
|
|
306
|
-
//socket.end();
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
this.LogInfoMessage(`Closing httpServer.`);
|
|
310
|
-
await this.#httpServer.close();
|
|
311
|
-
}
|
|
313
|
+
await this.TerminateHTTPServer();
|
|
312
314
|
|
|
313
|
-
|
|
314
|
-
this.LogInfoMessage(`Ending database connections and pools.`);
|
|
315
|
-
await this.TerminateDatabase();
|
|
316
|
-
//await this.accessLayer.enddatabase();
|
|
317
|
-
}
|
|
315
|
+
await this.TerminateDatabase();
|
|
318
316
|
|
|
317
|
+
// Output final messages here (before TerminateInstrumentController)
|
|
319
318
|
if (this.options.clusterMode) {
|
|
320
|
-
this.LogInfoMessage(
|
|
319
|
+
this.LogInfoMessage(`${logPrefix} clusterPerformExit value: [${clusterPerformExit}]`);
|
|
321
320
|
if (clusterPerformExit) {
|
|
322
|
-
this.LogInfoMessage(
|
|
321
|
+
this.LogInfoMessage(`${logPrefix} Process will self terminate with process.exit(0).`);
|
|
323
322
|
} else {
|
|
324
|
-
this.LogInfoMessage(
|
|
323
|
+
this.LogInfoMessage(`${logPrefix} Child process will not self terminate. Terminate will be handled by master process.`);
|
|
325
324
|
}
|
|
326
325
|
}
|
|
327
326
|
|
|
328
|
-
|
|
329
|
-
if (this.InstrumentController) {
|
|
330
|
-
this.LogInfoMessage(`Ending publisher.`);
|
|
331
|
-
setTimeout(() => {
|
|
332
|
-
//if (this.InstrumentController && this.InstrumentController.Workers.length > 0) {
|
|
333
|
-
if (this.InstrumentController) {
|
|
334
|
-
this.InstrumentController.EndPublish();
|
|
335
|
-
}
|
|
336
|
-
}, 100);
|
|
337
|
-
}
|
|
327
|
+
this.TerminateInstrumentController();
|
|
338
328
|
|
|
339
329
|
//@@ always return here appears to always cleanly exit
|
|
340
330
|
// and cleanly exit from socket.io cluster adaptor
|
|
@@ -344,24 +334,17 @@ export abstract class ServerProcessBase extends ProcessBase implements IServerPr
|
|
|
344
334
|
|
|
345
335
|
await Sleep(1000); // Allow socket.io time to clean-up
|
|
346
336
|
|
|
347
|
-
if (this.options.clusterMode) {
|
|
348
|
-
if (clusterPerformExit) {
|
|
337
|
+
if (this.options.clusterMode === true) {
|
|
338
|
+
if (clusterPerformExit === true) {
|
|
349
339
|
setTimeout(() => {
|
|
350
340
|
process.exit(0);
|
|
351
341
|
}, 0);
|
|
352
342
|
}
|
|
353
343
|
} else {
|
|
354
|
-
|
|
355
|
-
setTimeout(() => {
|
|
356
|
-
this.LogInfoMessage(`Performing process.exit(0).`);
|
|
357
|
-
process.exit(0);
|
|
358
|
-
}, this.#masterProcessExitTime); // Give the workers time to terminate gracefully
|
|
359
|
-
} else {
|
|
360
|
-
this.LogInfoMessage(`Performing process.exit(0) - Immediate.`);
|
|
361
|
-
}
|
|
344
|
+
this.ProcessExit(this.#masterProcessExitTime);
|
|
362
345
|
}
|
|
363
346
|
} else {
|
|
364
|
-
this.LogInfoMessage(
|
|
347
|
+
this.LogInfoMessage(`${logPrefix} Process already terminating.`);
|
|
365
348
|
}
|
|
366
349
|
}
|
|
367
350
|
|
|
@@ -152,8 +152,7 @@ export class SocketIoServerHelper<ClientToServerEvents extends STSDefaultClientT
|
|
|
152
152
|
return this.#namespace;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
DisconnectSockets = (): void =>
|
|
156
|
-
{
|
|
155
|
+
DisconnectSockets = (): void => {
|
|
157
156
|
for (const [, namespace] of Object.entries(this.#namespace)) {
|
|
158
157
|
namespace.socketionamespace.disconnectSockets();
|
|
159
158
|
}
|
package/src/stscontrollerbase.ts
CHANGED
|
@@ -13,8 +13,7 @@ import { Gauge, InstrumentGaugeTelemetry, InstrumentHistogramTelemetry, Instrume
|
|
|
13
13
|
|
|
14
14
|
import { ISocketRecord, ServerNetworkMiddleware, ServerNetworkMiddlewareEventName } from './middleware/serverNetworkMiddleware'
|
|
15
15
|
|
|
16
|
-
export class STSExpressServer
|
|
17
|
-
{
|
|
16
|
+
export class STSExpressServer {
|
|
18
17
|
#app: Express;
|
|
19
18
|
|
|
20
19
|
constructor(options: ProcessOptions, stsApp: IProcessBase)
|
|
@@ -3,8 +3,7 @@ import { StatusCodes } from 'http-status-codes'
|
|
|
3
3
|
import { STSControllerBase } from './stscontrollerbase'
|
|
4
4
|
import { IProcessBase } from './commonTypes'
|
|
5
5
|
|
|
6
|
-
export class STSLatencyController extends STSControllerBase
|
|
7
|
-
{
|
|
6
|
+
export class STSLatencyController extends STSControllerBase {
|
|
8
7
|
constructor(stsApp: IProcessBase) {
|
|
9
8
|
super(stsApp);
|
|
10
9
|
}
|
package/src/stslatencyroute.ts
CHANGED
|
@@ -2,8 +2,7 @@ import { STSRouterBase } from './stsrouterbase'
|
|
|
2
2
|
import { STSLatencyController } from './stslatencycontroller'
|
|
3
3
|
import { IProcessBase } from './commonTypes'
|
|
4
4
|
|
|
5
|
-
export class STSLatencyRoute extends STSRouterBase
|
|
6
|
-
{
|
|
5
|
+
export class STSLatencyRoute extends STSRouterBase {
|
|
7
6
|
constructor(stsApp: IProcessBase)
|
|
8
7
|
{
|
|
9
8
|
super(stsApp);
|
package/src/stsrouterbase.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
|
|
4
|
-
import { SingleProcessBase, STSNamespace, STSRoom,
|
|
4
|
+
import { SingleProcessBase, STSNamespace, STSRoom, STSSocketIONamespace, ProcessOptions } from './../index'
|
|
5
|
+
import { SocketIoServerHelper } from '@nsshunt/stsobservability'
|
|
5
6
|
|
|
6
7
|
import { Socket } from "socket.io";
|
|
7
8
|
|
package/src/workerprocessbase.ts
CHANGED
|
@@ -18,8 +18,7 @@ import { GetFirstNetworkInterface } from './network'
|
|
|
18
18
|
* @typedef {Object} options - todo
|
|
19
19
|
* @property {boolean} [wssServer=false] - Create a web socket server on this worker instance
|
|
20
20
|
*/
|
|
21
|
-
export class WorkerProcessBase extends ServerProcessBase implements IWorkerProcessBase
|
|
22
|
-
{
|
|
21
|
+
export class WorkerProcessBase extends ServerProcessBase implements IWorkerProcessBase {
|
|
23
22
|
#inFlightMessage: IPCMessages = { }
|
|
24
23
|
#requestResponseMessageTimeout = 5000; //@@ config
|
|
25
24
|
#pingTimeout: NodeJS.Timeout | null = null;
|