loopd: export Config struct

pull/202/head
Oliver Gugger 4 years ago
parent 5f70a05463
commit e696a38ec8
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

@ -28,7 +28,7 @@ type lndConfig struct {
type viewParameters struct{}
type config struct {
type Config struct {
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`
Insecure bool `long:"insecure" description:"disable tls"`
Network string `long:"network" description:"network to run on" choice:"regtest" choice:"testnet" choice:"mainnet" choice:"simnet"`
@ -60,8 +60,8 @@ const (
)
// DefaultConfig returns all default values for the Config struct.
func DefaultConfig() config {
return config{
func DefaultConfig() Config {
return Config{
Network: "mainnet",
RPCListen: "localhost:11010",
RESTListen: "localhost:8081",

@ -40,7 +40,7 @@ type listenerCfg struct {
// daemon runs loopd in daemon mode. It will listen for grpc connections,
// execute commands and pass back swap status information.
func daemon(config *config, lisCfg *listenerCfg) error {
func daemon(config *Config, lisCfg *listenerCfg) error {
lnd, err := lisCfg.getLnd(config.Network, config.Lnd)
if err != nil {
return err

@ -47,7 +47,7 @@ type RPCConfig struct {
// newListenerCfg creates and returns a new listenerCfg from the passed config
// and RPCConfig.
func newListenerCfg(config *config, rpcCfg RPCConfig) *listenerCfg {
func newListenerCfg(config *Config, rpcCfg RPCConfig) *listenerCfg {
return &listenerCfg{
grpcListener: func() (net.Listener, error) {
// If a custom RPC listener is set, we will listen on

@ -10,7 +10,7 @@ import (
)
// getClient returns an instance of the swap client.
func getClient(config *config, lnd *lndclient.LndServices) (*loop.Client,
func getClient(config *Config, lnd *lndclient.LndServices) (*loop.Client,
func(), error) {
storeDir, err := getStoreDir(config.Network)

@ -10,7 +10,7 @@ import (
)
// view prints all swaps currently in the database.
func view(config *config, lisCfg *listenerCfg) error {
func view(config *Config, lisCfg *listenerCfg) error {
chainParams, err := swap.ChainParamsFromNetwork(config.Network)
if err != nil {
return err

Loading…
Cancel
Save