multi: refactor external subserver config

As a preparation for making more and more implementation details
configurable, we add a new ImplementationCfg struct that houses all the
interfaces that can be defined externally.
This commit is contained in:
Oliver Gugger committed 2021-10-08 12:08:23 +02:00
1 parent 140d5a8086
commit 0e279eb15a
6 files changed
+165 -113

No files matched your search

+2 -1
View File
@@ -99,6 +99,7 @@ func Start(extraArgs string, rpcReady Callback) {
Ready: rpcListening,
}},
}
implCfg := loadedConfig.ImplementationConfig()
// Call the "real" main in a nested manner so the defers will properly
// be executed in the case of a graceful shutdown.
@@ -107,7 +108,7 @@ func Start(extraArgs string, rpcReady Callback) {
defer close(quit)
if err := lnd.Main(
loadedConfig, cfg, shutdownInterceptor,
loadedConfig, cfg, implCfg, shutdownInterceptor,
); err != nil {
if e, ok := err.(*flags.Error); ok &&
e.Type == flags.ErrHelp {