terminal: init the autopilot client

This commit is contained in:
Elle Mouton 2022-07-08 14:23:04 +02:00
parent 4639e7e5ba
commit 683cdbd566
No known key found for this signature in database
GPG key ID: D7D916376026F177
2 changed files with 60 additions and 0 deletions

View file

@ -17,6 +17,7 @@ import (
"github.com/lightninglabs/faraday"
"github.com/lightninglabs/faraday/chain"
"github.com/lightninglabs/faraday/frdrpcserver"
"github.com/lightninglabs/lightning-terminal/autopilotserver"
mid "github.com/lightninglabs/lightning-terminal/rpcmiddleware"
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/loop/loopd"
@ -185,6 +186,8 @@ type Config struct {
RPCMiddleware *mid.Config `group:"RPC middleware options" namespace:"rpcmiddleware"`
Autopilot *autopilotserver.Config `group:"Autopilot server options" namespace:"autopilot"`
// faradayRpcConfig is a subset of faraday's full configuration that is
// passed into faraday's RPC server.
faradayRpcConfig *frdrpcserver.Config
@ -325,6 +328,9 @@ func defaultConfig() *Config {
Pool: &poolDefaultConfig,
RPCMiddleware: mid.DefaultConfig(),
FirstLNCConnDeadline: defaultFirstLNCConnTimeout,
Autopilot: &autopilotserver.Config{
PingCadence: time.Hour,
},
}
}