You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config: add remote modes for Faraday, Loop and Pool
As a first step towards making it possible to only run the UI itself and
have all daemons run on another host (or in another process), we add new
remote configuration options for each of the remaining daemons.
LetsEncryptDirstring`long:"letsencryptdir" description:"The directory where the Let's Encrypt library will store its key and certificate."`
116
122
LetsEncryptListenstring`long:"letsencryptlisten" description:"The IP:port on which LiT will listen for Let's Encrypt challenges. Let's Encrypt will always try to contact on port 80. Often non-root processes are not allowed to bind to ports lower than 1024. This configuration option allows a different port to be used, but must be used in combination with port forwarding from port 80. This configuration can also be used to specify another IP address to listen on, for example an IPv6 address."`
117
123
118
-
LndModestring`long:"lnd-mode" description:"The mode to run lnd in, either 'integrated' (default) or 'remote'. 'integrated' means lnd is started alongside the UI and everything is stored in lnd's main data directory, configure everything by using the --lnd.* flags. 'remote' means the UI connects to an existing lnd node and acts as a proxy for gRPC calls to it. In the remote node LiT creates its own directory for log and configuration files, configure everything using the --remote.* flags." choice:"integrated" choice:"remote"`
119
-
120
124
LitDirstring`long:"lit-dir" description:"The main directory where LiT looks for its configuration file. If LiT is running in 'remote' lnd mode, this is also the directory where the TLS certificates and log files are stored by default."`
121
125
ConfigFilestring`long:"configfile" description:"Path to LiT's configuration file."`
122
126
@@ -128,15 +132,34 @@ type Config struct {
128
132
129
133
Remote*RemoteConfig`group:"Remote mode options (use when lnd-mode=remote)" namespace:"remote"`
// LndMode is the selected mode to run lnd in. The supported modes are
136
+
// 'integrated' and 'remote'. We only use a string instead of a bool
137
+
// here (and for all the other daemons) to make the CLI more user
138
+
// friendly. Because then we can reference the explicit modes in the
139
+
// help descriptions of the section headers. We'll parse the mode into
140
+
// a bool for internal use for better code readability.
141
+
LndModestring`long:"lnd-mode" description:"The mode to run lnd in, either 'integrated' (default) or 'remote'. 'integrated' means lnd is started alongside the UI and everything is stored in lnd's main data directory, configure everything by using the --lnd.* flags. 'remote' means the UI connects to an existing lnd node and acts as a proxy for gRPC calls to it. In the remote node LiT creates its own directory for log and configuration files, configure everything using the --remote.* flags." choice:"integrated" choice:"remote"`
142
+
Lnd*lnd.Config`group:"Integrated lnd (use when lnd-mode=integrated)" namespace:"lnd"`
143
+
144
+
FaradayModestring`long:"faraday-mode" description:"The mode to run faraday in, either 'integrated' (default) or 'remote'. 'integrated' means faraday is started alongside the UI and everything is stored in faraday's main data directory, configure everything by using the --faraday.* flags. 'remote' means the UI connects to an existing faraday node and acts as a proxy for gRPC calls to it." choice:"integrated" choice:"remote"`
145
+
Faraday*faraday.Config`group:"Integrated faraday options (use when faraday-mode=integrated)" namespace:"faraday"`
134
146
135
-
Lnd*lnd.Config`group:"Integrated lnd (use when lnd-mode=integrated)" namespace:"lnd"`
147
+
LoopModestring`long:"loop-mode" description:"The mode to run loop in, either 'integrated' (default) or 'remote'. 'integrated' means loopd is started alongside the UI and everything is stored in loop's main data directory, configure everything by using the --loop.* flags. 'remote' means the UI connects to an existing loopd node and acts as a proxy for gRPC calls to it." choice:"integrated" choice:"remote"`
148
+
Loop*loopd.Config`group:"Integrated loop options (use when loop-mode=integrated)" namespace:"loop"`
149
+
150
+
PoolModestring`long:"pool-mode" description:"The mode to run pool in, either 'integrated' (default) or 'remote'. 'integrated' means poold is started alongside the UI and everything is stored in pool's main data directory, configure everything by using the --pool.* flags. 'remote' means the UI connects to an existing poold node and acts as a proxy for gRPC calls to it." choice:"integrated" choice:"remote"`
151
+
Pool*pool.Config`group:"Integrated pool options (use when pool-mode=integrated)" namespace:"pool"`
136
152
137
153
// faradayRpcConfig is a subset of faraday's full configuration that is
138
154
// passed into faraday's RPC server.
139
155
faradayRpcConfig*frdrpc.Config
156
+
157
+
// lndRemote is a convenience bool variable that is parsed from the
158
+
// LndMode string variable on startup.
159
+
lndRemotebool
160
+
faradayRemotebool
161
+
loopRemotebool
162
+
poolRemotebool
140
163
}
141
164
142
165
// RemoteConfig holds the configuration parameters that are needed when running
@@ -151,7 +174,10 @@ type RemoteConfig struct {
151
174
152
175
LitDebugLevelstring`long:"lit-debuglevel" description:"For lnd remote mode only: Logging level for all subsystems {trace, debug, info, warn, error, critical} -- You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set the log level for individual subsystems."`
153
176
154
-
Lnd*RemoteDaemonConfig`group:"Remote lnd (use when lnd-mode=remote)" namespace:"lnd"`
177
+
Lnd*RemoteDaemonConfig`group:"Remote lnd (use when lnd-mode=remote)" namespace:"lnd"`
178
+
Faraday*RemoteDaemonConfig`group:"Remote faraday (use when faraday-mode=remote)" namespace:"faraday"`
179
+
Loop*RemoteDaemonConfig`group:"Remote loop (use when loop-mode=remote)" namespace:"loop"`
180
+
Pool*RemoteDaemonConfig`group:"Remote pool (use when pool-mode=remote)" namespace:"pool"`
155
181
}
156
182
157
183
// RemoteDaemonConfig holds the configuration parameters that are needed to
0 commit comments