lnrpc+subserver_cfg: add configs for autopilot sub-server
This commit is contained in:
parent
db4bbe1c3a
commit
413aad5efa
17
lnrpc/autopilotrpc/config_active.go
Normal file
17
lnrpc/autopilotrpc/config_active.go
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// +build autopilotrpc
|
||||||
|
|
||||||
|
package autopilotrpc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/lightningnetwork/lnd/autopilot"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Config is the primary configuration struct for the autopilot RPC server. It
|
||||||
|
// contains all the items required for the rpc server to carry out its
|
||||||
|
// duties. The fields with struct tags are meant to be parsed as normal
|
||||||
|
// configuration options, while if able to be populated, the latter fields MUST
|
||||||
|
// also be specified.
|
||||||
|
type Config struct {
|
||||||
|
// Manager is the running autopilot manager.
|
||||||
|
Manager *autopilot.Manager
|
||||||
|
}
|
6
lnrpc/autopilotrpc/config_default.go
Normal file
6
lnrpc/autopilotrpc/config_default.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// +build !autopilotrpc
|
||||||
|
|
||||||
|
package autopilotrpc
|
||||||
|
|
||||||
|
// Config is empty for non-autopilotrpc builds.
|
||||||
|
type Config struct{}
|
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
|
"github.com/lightningnetwork/lnd/lnrpc/autopilotrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
|
||||||
"github.com/lightningnetwork/lnd/macaroons"
|
"github.com/lightningnetwork/lnd/macaroons"
|
||||||
@ -25,6 +26,10 @@ type subRPCServerConfigs struct {
|
|||||||
// also requests keys and addresses under control of the backing
|
// also requests keys and addresses under control of the backing
|
||||||
// wallet.
|
// wallet.
|
||||||
WalletKitRPC *walletrpc.Config `group:"walletrpc" namespace:"walletrpc"`
|
WalletKitRPC *walletrpc.Config `group:"walletrpc" namespace:"walletrpc"`
|
||||||
|
|
||||||
|
// AutopilotRPC is a sub-RPC server that exposes methods on the running
|
||||||
|
// autopilot as a gRPC service.
|
||||||
|
AutopilotRPC *autopilotrpc.Config `group:"autopilotrpc" namespace:"autopilotrpc"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PopulateDependencies attempts to iterate through all the sub-server configs
|
// PopulateDependencies attempts to iterate through all the sub-server configs
|
||||||
|
Loading…
Reference in New Issue
Block a user