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:
6 files changed
+165
-113
No files matched your search
+2
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user