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
@@ -31,11 +31,12 @@ func main() {
// Help was requested, exit normally.
os.Exit(0)
}
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.
if err = lnd.Main(
loadedConfig, lnd.ListenerCfg{}, shutdownInterceptor,
loadedConfig, lnd.ListenerCfg{}, implCfg, shutdownInterceptor,
); err != nil {
_, _ = fmt.Fprintln(os.Stderr, err)
os.Exit(1)