Documentation
¶
Overview ¶
Package faraday contains the main function for faraday.
Index ¶
Constants ¶
const (
DefaultNetwork = "mainnet"
)
const Subsystem = "FRDY"
Subsystem defines the logging code for this subsystem.
Variables ¶
var ( // FaradayDirBase is the default main directory where faraday stores its // data. FaradayDirBase = btcutil.AppDataDir("faraday", false) // DefaultTLSCertFilename is the default file name for the autogenerated // TLS certificate. DefaultTLSCertFilename = "tls.cert" // DefaultTLSKeyFilename is the default file name for the autogenerated // TLS key. DefaultTLSKeyFilename = "tls.key" // DefaultTLSCertPath is the default full path of the autogenerated TLS // certificate. DefaultTLSCertPath = filepath.Join( FaradayDirBase, DefaultNetwork, DefaultTLSCertFilename, ) // DefaultTLSKeyPath is the default full path of the autogenerated TLS // key. DefaultTLSKeyPath = filepath.Join( FaradayDirBase, DefaultNetwork, DefaultTLSKeyFilename, ) // DefaultMacaroonFilename is the default file name for the // autogenerated faraday macaroon. DefaultMacaroonFilename = "faraday.macaroon" // DefaultMacaroonPath is the default full path of the base faraday // macaroon. DefaultMacaroonPath = filepath.Join( FaradayDirBase, DefaultNetwork, DefaultMacaroonFilename, ) )
var Commit string
Commit stores the current commit hash of this build, this should be set using the -ldflags during compilation.
Functions ¶
func Main ¶
func Main() error
Main is the real entry point for faraday. It is required to ensure that defers are properly executed when os.Exit() is called.
func SetupLoggers ¶
func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor)
SetupLoggers initializes all package-global logger variables.
func UseLogger ¶
UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.
func ValidateConfig ¶
ValidateConfig sanitizes all file system paths and makes sure no incompatible configuration combinations are used.
func Version ¶
func Version() string
Version returns the application version as a properly formed string per the semantic versioning 2.0.0 spec (http://semver.org/).
Types ¶
type Config ¶
type Config struct {
// Lnd holds the configuration options for the connection to lnd.
Lnd *LndConfig `group:"lnd" namespace:"lnd"`
// FaradayDir is the main directory where faraday stores all its data.
FaradayDir string `` /* 151-byte string literal not displayed */
// ChainConn specifies whether to attempt connecting to a bitcoin backend.
ChainConn bool `` /* 161-byte string literal not displayed */
ShowVersion bool `long:"version" description:"Display version information and exit"`
// MinimumMonitored is the minimum amount of time that a channel must be monitored for before we consider it for termination.
MinimumMonitored time.Duration `` /* 163-byte string literal not displayed */
// Network is a string containing the network we're running on.
Network string `long:"network" description:"The network to run on." choice:"regtest" choice:"testnet" choice:"mainnet" choice:"simnet"`
// DebugLevel is a string defining the log level for the service either
// for all subsystems the same or individual level by subsystem.
DebugLevel string `long:"debuglevel" description:"Debug level for faraday and its subsystems."`
TLSCertPath string `long:"tlscertpath" description:"Path to write the TLS certificate for faraday's RPC and REST services."`
TLSKeyPath string `long:"tlskeypath" description:"Path to write the TLS private key for faraday's RPC and REST services."`
TLSExtraIPs []string `long:"tlsextraip" description:"Adds an extra IP to the generated certificate."`
TLSExtraDomains []string `long:"tlsextradomain" description:"Adds an extra domain to the generated certificate."`
TLSAutoRefresh bool `long:"tlsautorefresh" description:"Re-generate TLS certificate and key if the IPs or domains are changed."`
TLSDisableAutofill bool `` /* 174-byte string literal not displayed */
MacaroonPath string `long:"macaroonpath" description:"Path to write the macaroon for faraday's RPC and REST services if it doesn't exist."`
// RPCListen is the listen address for the faraday rpc server.
RPCListen string `long:"rpclisten" description:"Address to listen on for gRPC clients."`
// RESTListen is the listen address for the faraday REST server.
RESTListen string `long:"restlisten" description:"Address to listen on for REST clients. If not specified, no REST listener will be started."`
// CORSOrigin specifies the CORS header that should be set on REST responses. No header is added if the value is empty.
CORSOrigin string `long:"corsorigin" description:"The value to send in the Access-Control-Allow-Origin header. Header will be omitted if empty."`
// Bitcoin is the configuration required to connect to a bitcoin node.
Bitcoin *chain.BitcoinConfig `group:"bitcoin" namespace:"bitcoin"`
}
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns all default values for the Config struct.
type LndConfig ¶
type LndConfig struct {
// RPCServer is host:port that lnd's RPC server is listening on.
RPCServer string `long:"rpcserver" description:"host:port that LND is listening for RPC connections on"`
// MacaroonDir is the directory containing macaroons.
MacaroonDir string `long:"macaroondir" description:"Dir containing macaroons"`
// TLSCertPath is the path to the tls cert that faraday should use.
TLSCertPath string `long:"tlscertpath" description:"Path to TLS cert"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
faraday
command
|
|
|
frcli
command
|
|
|
Package dataset provides a basic dataset type which provides functionality for detecting inter-quartile range outliers.
|
Package dataset provides a basic dataset type which provides functionality for detecting inter-quartile range outliers. |
|
Package frdrpc is a reverse proxy.
|
Package frdrpc is a reverse proxy. |
|
Package lndwrap wraps various calls to lndclient for convenience.
|
Package lndwrap wraps various calls to lndclient for convenience. |
|
Package recommend provides recommendations for closing channels with the constraints provided in its close recommendation config.
|
Package recommend provides recommendations for closing channels with the constraints provided in its close recommendation config. |