* add configuration options to enable the NATS server HTTP monitoring
endpoint:
- NATS_MONITORING_ENABLED (defaults to false)
- NATS_MONITORING_HTTP_HOST (defaults to 127.0.0.1)
- NATS_MONITORING_HTTP_PORT (defaults to 8222)
- NATS_MONITORING_ENABLE_TLS (defaults to false)
Fixes#3294
Previously the Supervisor was shutdonw as soon as the main context was
canceled. Which cause the managed services to fail during shutdown (in
"trapShutdownCtx()") as the Supervisor was gone already.
We now pass a separate Context to Supervisor.ServeBackground() to avoid
this.
Fixes: #2282
Only enable trace and/or debug logging when the outer logger has the
log level set accordingly. Even when the though the messages where not
really logged the nats service wasted quite some cycles especially in
the trace log related code path.
Related issue: #716
* use tls for nats connections
* add config options for nats client tls config
* add nats tls config to CI
* add function to create a certpool
* add option to provide a rootCA to validate the server's TLS certificate
* add option to provide a rootCA to validate the server's TLS certificate
* add option to provide a rootCA to validate the server's TLS certificate
* add option to provide a rootCA to validate the server's TLS certificate
* configure nats clients in reva to use tls
The help flag is configured automatically by default already. We don't
need to redo that for every single service.
This also addresses one of the finding of "go race" (#4088)