github.com/decred/dcrlnd@v0.7.6/lnrpc/chainrpc/config_active.go (about)

     1  //go:build !no_chainrpc
     2  // +build !no_chainrpc
     3  
     4  package chainrpc
     5  
     6  import (
     7  	"github.com/decred/dcrlnd/chainntnfs"
     8  	"github.com/decred/dcrlnd/macaroons"
     9  )
    10  
    11  // Config is the primary configuration struct for the chain notifier RPC server.
    12  // It contains all the items required for the server to carry out its duties.
    13  // The fields with struct tags are meant to be parsed as normal configuration
    14  // options, while if able to be populated, the latter fields MUST also be
    15  // specified.
    16  type Config struct {
    17  	// ChainNotifierMacPath is the path for the chain notifier macaroon. If
    18  	// unspecified then we assume that the macaroon will be found under the
    19  	// network directory, named DefaultChainNotifierMacFilename.
    20  	ChainNotifierMacPath string `long:"notifiermacaroonpath" description:"Path to the chain notifier macaroon"`
    21  
    22  	// NetworkDir is the main network directory wherein the chain notifier
    23  	// RPC server will find the macaroon named
    24  	// DefaultChainNotifierMacFilename.
    25  	NetworkDir string
    26  
    27  	// MacService is the main macaroon service that we'll use to handle
    28  	// authentication for the chain notifier RPC server.
    29  	MacService *macaroons.Service
    30  
    31  	// ChainNotifier is the chain notifier instance that backs the chain
    32  	// notifier RPC server. The job of the chain notifier RPC server is
    33  	// simply to proxy valid requests to the active chain notifier instance.
    34  	ChainNotifier chainntnfs.ChainNotifier
    35  }