Configure whether to dial secure connection to remote Nitro node

This commit is contained in:
neeraj
2023-10-18 18:19:36 +05:30
committed by prathamesh
parent b52f83c0d7
commit 71c028435d
4 changed files with 9 additions and 2 deletions
+4
View File
@@ -91,6 +91,7 @@ const (
NITRO_USE_DURABLE_STORE = "NITRO_USE_DURABLE_STORE"
NITRO_DURABLE_STORE_FOLDER = "NITRO_DURABLE_STORE_FOLDER"
NITRO_ENDPOINT = "NITRO_ENDPOINT"
NITRO_IS_SECURE = "NITRO_IS_SECURE"
NITRO_MSG_PORT = "NITRO_MSG_PORT"
NITRO_WS_MSG_PORT = "NITRO_WS_MSG_PORT"
NITRO_RPC_PORT = "NITRO_RPC_PORT"
@@ -118,6 +119,7 @@ type InProcessNitroNodeConfig struct {
type RemoteNitroNodeConfig struct {
NitroEndpoint string
IsSecure bool
}
type NitroConfig struct {
@@ -352,6 +354,7 @@ func (c *Config) loadNitroConfig() {
viper.BindEnv("nitro.inProcesssNode.tlsKeyFilepath", NITRO_TLS_KEY_FILEPATH)
viper.BindEnv("nitro.remoteNode.nitroEndpoint", NITRO_ENDPOINT)
viper.BindEnv("nitro.remoteNode.isSecure", NITRO_IS_SECURE)
c.Nitro.RunNodeInProcess = viper.GetBool("nitro.runNodeInProcess")
c.Nitro.RpcQueryRatesFile = viper.GetString("nitro.rpcQueryRatesFile")
@@ -372,6 +375,7 @@ func (c *Config) loadNitroConfig() {
c.Nitro.InProcessNode.TlsKeyFilepath = viper.GetString("nitro.inProcesssNode.tlsKeyFilepath")
c.Nitro.RemoteNode.NitroEndpoint = viper.GetString("nitro.remoteNode.nitroEndpoint")
c.Nitro.RemoteNode.IsSecure = viper.GetBool("nitro.remoteNode.isSecure")
}
func (c *Config) loadGroupCacheConfig() {