mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
multi: replace standalone gRPC web proxy with unified binary
This commit is contained in:
parent
e88a9bf482
commit
b96b4977f0
10 changed files with 1286 additions and 248 deletions
20
cmd/shushtar/main.go
Normal file
20
cmd/shushtar/main.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/jessevdk/go-flags"
|
||||
"github.com/lightninglabs/shushtar"
|
||||
)
|
||||
|
||||
// main starts the shushtar application.
|
||||
func main() {
|
||||
err := shushtar.New().Run()
|
||||
if e, ok := err.(*flags.Error); err != nil &&
|
||||
(!ok || e.Type != flags.ErrHelp) {
|
||||
|
||||
_, _ = fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
197
config.go
197
config.go
|
|
@ -1,42 +1,181 @@
|
|||
package main
|
||||
package shushtar
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/jessevdk/go-flags"
|
||||
"github.com/lightninglabs/faraday"
|
||||
"github.com/lightninglabs/loop/loopd"
|
||||
"github.com/lightningnetwork/lnd"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
"github.com/lightningnetwork/lnd/cert"
|
||||
"github.com/lightningnetwork/lnd/lncfg"
|
||||
"github.com/mwitkow/go-conntrack/connhelpers"
|
||||
)
|
||||
|
||||
var (
|
||||
defaultHTTPSListen = "localhost:8443"
|
||||
defaultLndHost = "localhost:10009"
|
||||
defaultLoopHost = "localhost:10010"
|
||||
defaultTLSCertPath = "https.cert"
|
||||
defaultTLSKeyPath = "https.key"
|
||||
)
|
||||
|
||||
type config struct {
|
||||
HTTPSListen string `long:"httpslisten" description:"host:port to listen for incoming HTTP/2 connections on"`
|
||||
LNDHost string `long:"lndhost" description:"host:port that LND listens for RPC connections on"`
|
||||
LoopHost string `long:"loophost" description:"host:port that Loop listens for RPC connections on"`
|
||||
TLSCertPath string `long:"tlscertpath" description:"path to the TLS cert to use for HTTPS requests"`
|
||||
TLSKeyPath string `long:"tlskeypath" description:"path to the TLS key to use for HTTPS requests"`
|
||||
// Config is the main configuration struct of shushtar. It contains all config
|
||||
// items of its enveloping subservers, each prefixed with their daemon's short
|
||||
// name.
|
||||
type Config struct {
|
||||
HTTPSListen string `long:"httpslisten" description:"host:port to listen for incoming HTTP/2 connections on"`
|
||||
Lnd *lnd.Config `group:"lnd" namespace:"lnd"`
|
||||
Faraday *faraday.Config `group:"faraday" namespace:"faraday"`
|
||||
Loop *loopd.Config `group:"loop" namespace:"loop"`
|
||||
}
|
||||
|
||||
// loadConfig starts with a skeleton default config, and reads in user provided
|
||||
// configuration from the command line. It does not provide a full set of
|
||||
// defaults or validate user input.
|
||||
func loadConfig() (*config, error) {
|
||||
// Start with a default config.
|
||||
config := &config{
|
||||
HTTPSListen: defaultHTTPSListen,
|
||||
LNDHost: defaultLndHost,
|
||||
LoopHost: defaultLoopHost,
|
||||
TLSCertPath: defaultTLSCertPath,
|
||||
TLSKeyPath: defaultTLSKeyPath,
|
||||
// loadLndConfig loads and sanitizes the lnd main configuration and hooks up all
|
||||
// loggers.
|
||||
func loadLndConfig(preCfg *Config) (*lnd.Config, error) {
|
||||
// Show the version and exit if the version flag was specified.
|
||||
appName := filepath.Base(os.Args[0])
|
||||
appName = strings.TrimSuffix(appName, filepath.Ext(appName))
|
||||
usageMessage := fmt.Sprintf("Use %s -h to show usage", appName)
|
||||
if preCfg.Lnd.ShowVersion {
|
||||
fmt.Println(appName, "version", build.Version(),
|
||||
"commit="+build.Commit)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
// Parse command line options to obtain user specified values.
|
||||
if _, err := flags.Parse(config); err != nil {
|
||||
// If the config file path has not been modified by the user, then we'll
|
||||
// use the default config file path. However, if the user has modified
|
||||
// their lnddir, then we should assume they intend to use the config
|
||||
// file within it.
|
||||
configFileDir := lnd.CleanAndExpandPath(preCfg.Lnd.LndDir)
|
||||
configFilePath := lnd.CleanAndExpandPath(preCfg.Lnd.ConfigFile)
|
||||
if configFileDir != lnd.DefaultLndDir {
|
||||
if configFilePath == lnd.DefaultConfigFile {
|
||||
configFilePath = filepath.Join(
|
||||
configFileDir, lncfg.DefaultConfigFilename,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Next, load any additional configuration options from the file.
|
||||
var configFileError error
|
||||
cfg := preCfg
|
||||
if err := flags.IniParse(configFilePath, cfg); err != nil {
|
||||
// If it's a parsing related error, then we'll return
|
||||
// immediately, otherwise we can proceed as possibly the config
|
||||
// file doesn't exist which is OK.
|
||||
if _, ok := err.(*flags.IniError); ok {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
configFileError = err
|
||||
}
|
||||
|
||||
// Finally, parse the remaining command line options again to ensure
|
||||
// they take precedence.
|
||||
if _, err := flags.Parse(cfg); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return config, nil
|
||||
// Make sure everything we just loaded makes sense.
|
||||
cleanCfg, err := lnd.ValidateConfig(*cfg.Lnd, usageMessage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// With the validated config obtained, we now know that the root logging
|
||||
// system of lnd is initialized and we can hook up our own loggers now.
|
||||
SetupLoggers(cleanCfg.LogWriter)
|
||||
|
||||
// Warn about missing config file only after all other configuration is
|
||||
// done. This prevents the warning on help messages and invalid options.
|
||||
// Note this should go directly before the return.
|
||||
if configFileError != nil {
|
||||
log.Warnf("%v", configFileError)
|
||||
}
|
||||
|
||||
return cleanCfg, nil
|
||||
}
|
||||
|
||||
func getNetwork(cfg *lncfg.Chain) (string, error) {
|
||||
switch {
|
||||
case cfg.MainNet:
|
||||
return "mainnet", nil
|
||||
|
||||
case cfg.TestNet3:
|
||||
return "testnet", nil
|
||||
|
||||
case cfg.RegTest:
|
||||
return "regtest", nil
|
||||
|
||||
case cfg.SimNet:
|
||||
return "simnet", nil
|
||||
|
||||
default:
|
||||
return "", fmt.Errorf("no network selected")
|
||||
}
|
||||
}
|
||||
|
||||
func buildTLSConfigForHttp2(config *lnd.Config) (*tls.Config, error) {
|
||||
tlsCert, _, err := cert.LoadCert(config.TLSCertPath, config.TLSKeyPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed reading TLS server keys: %v",
|
||||
err)
|
||||
}
|
||||
tlsConfig := cert.TLSConfFromCert(tlsCert)
|
||||
tlsConfig.CipherSuites = append(
|
||||
tlsConfig.CipherSuites,
|
||||
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
||||
)
|
||||
tlsConfig, err = connhelpers.TlsConfigWithHttp2Enabled(tlsConfig)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("can't configure h2 handling: %v", err)
|
||||
}
|
||||
return tlsConfig, nil
|
||||
}
|
||||
|
||||
// onDemandListener is a net.Listener that only actually starts to listen on a
|
||||
// network port once the Accept method is called.
|
||||
type onDemandListener struct {
|
||||
addr net.Addr
|
||||
lis net.Listener
|
||||
}
|
||||
|
||||
// Accept waits for and returns the next connection to the listener.
|
||||
func (l *onDemandListener) Accept() (net.Conn, error) {
|
||||
if l.lis == nil {
|
||||
var err error
|
||||
l.lis, err = net.Listen(parseNetwork(l.addr), l.addr.String())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return l.lis.Accept()
|
||||
}
|
||||
|
||||
// Close closes the listener.
|
||||
// Any blocked Accept operations will be unblocked and return errors.
|
||||
func (l *onDemandListener) Close() error {
|
||||
return l.lis.Close()
|
||||
}
|
||||
|
||||
// Addr returns the listener's network address.
|
||||
func (l *onDemandListener) Addr() net.Addr {
|
||||
return l.addr
|
||||
}
|
||||
|
||||
// parseNetwork parses the network type of the given address.
|
||||
func parseNetwork(addr net.Addr) string {
|
||||
switch addr := addr.(type) {
|
||||
// TCP addresses resolved through net.ResolveTCPAddr give a default
|
||||
// network of "tcp", so we'll map back the correct network for the given
|
||||
// address. This ensures that we can listen on the correct interface
|
||||
// (IPv4 vs IPv6).
|
||||
case *net.TCPAddr:
|
||||
if addr.IP.To4() != nil {
|
||||
return "tcp4"
|
||||
}
|
||||
return "tcp6"
|
||||
|
||||
default:
|
||||
return addr.Network()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
28
go.mod
28
go.mod
|
|
@ -1,21 +1,35 @@
|
|||
module github.com/lightninglabs/shushtar
|
||||
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
||||
github.com/gorilla/websocket v1.4.2 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.12.2
|
||||
github.com/improbable-eng/grpc-web v0.12.0
|
||||
github.com/jessevdk/go-flags v1.4.0
|
||||
github.com/jpillora/backoff v1.0.0 // indirect
|
||||
github.com/lightninglabs/faraday v0.1.0-alpha.0.20200518080657-d3726a59507c
|
||||
github.com/lightninglabs/loop v0.6.2-beta.0.20200528104150-c281cab8a036
|
||||
github.com/lightningnetwork/lnd v0.10.1-beta.rc1
|
||||
github.com/lightningnetwork/lnd/cert v1.0.2
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f
|
||||
github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76
|
||||
github.com/prometheus/client_golang v1.5.1 // indirect
|
||||
github.com/rakyll/statik v0.1.7
|
||||
github.com/rs/cors v1.7.0 // indirect
|
||||
github.com/sirupsen/logrus v1.5.0
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect
|
||||
golang.org/x/sys v0.0.0-20200406155108-e3b113bbe6a4 // indirect
|
||||
google.golang.org/grpc v1.28.0
|
||||
gopkg.in/macaroon-bakery.v2 v2.1.0
|
||||
gopkg.in/macaroon.v2 v2.1.0
|
||||
)
|
||||
|
||||
// Manually solve the conflict between loop's lndclient version of lnd and what
|
||||
// we explicitly need for the unified binary to work.
|
||||
replace github.com/lightningnetwork/lnd => github.com/lightningnetwork/lnd v0.10.0-beta.rc6.0.20200528052558-24c865450a77
|
||||
|
||||
// Needed because lnd now imports the etcd client which doesn't follow the go
|
||||
// mod guidelines. Unfortunately replace directives from dependency projects
|
||||
// aren't picked up so we need to specify this here and in lnd.
|
||||
replace github.com/coreos/go-systemd => github.com/coreos/go-systemd/v22 v22.0.0
|
||||
|
||||
go 1.13
|
||||
|
|
|
|||
286
go.sum
286
go.sum
|
|
@ -1,106 +1,254 @@
|
|||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
git.schwanenlied.me/yawning/bsaes.git v0.0.0-20180720073208-c0276d75487e h1:F2x1bq7RaNCIuqYpswggh1+c1JmwdnkHNC9wy1KDip0=
|
||||
git.schwanenlied.me/yawning/bsaes.git v0.0.0-20180720073208-c0276d75487e/go.mod h1:BWqTsj8PgcPriQJGl7el20J/7TuT1d/hSyFDXMEpoEo=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e h1:n+DcnTNkQnHlwpsrHoQtkrJIO7CBx029fw6oR4vIob4=
|
||||
github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e/go.mod h1:Bdzq+51GR4/0DIhaICZEOm+OHvXGwwB2trKZ8B4Y6eQ=
|
||||
github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82 h1:MG93+PZYs9PyEsj/n5/haQu2gK0h4tUtSy9ejtMwWa0=
|
||||
github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82/go.mod h1:GbuBk21JqF+driLX3XtJYNZjGa45YDoa9IqCTzNSfEc=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/Yawning/aez v0.0.0-20180114000226-4dad034d9db2 h1:2be4ykKKov3M1yISM2E8gnGXZ/N2SsPawfnGiXxaYEU=
|
||||
github.com/Yawning/aez v0.0.0-20180114000226-4dad034d9db2/go.mod h1:9pIqrY6SXNL8vjRQE5Hd/OL5GyK/9MrGUWs87z/eFfk=
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
|
||||
github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg=
|
||||
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=
|
||||
github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=
|
||||
github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=
|
||||
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
|
||||
github.com/btcsuite/btcd v0.20.1-beta.0.20200513120220-b470eee47728/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
|
||||
github.com/btcsuite/btcd v0.20.1-beta.0.20200515232429-9f0179fd2c46 h1:QyTpiR5nQe94vza2qkvf7Ns8XX2Rjh/vdIhO3RzGj4o=
|
||||
github.com/btcsuite/btcd v0.20.1-beta.0.20200515232429-9f0179fd2c46/go.mod h1:Yktc19YNjh/Iz2//CX0vfRTS4IJKM/RKO5YZ9Fn+Pgo=
|
||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
|
||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
||||
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||
github.com/btcsuite/btcutil v1.0.1 h1:GKOz8BnRjYrb/JTKgaOk+zh26NWNdSNvdvv0xoAZMSA=
|
||||
github.com/btcsuite/btcutil v1.0.1/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts=
|
||||
github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts=
|
||||
github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts=
|
||||
github.com/btcsuite/btcutil/psbt v1.0.2 h1:gCVY3KxdoEVU7Q6TjusPO+GANIwVgr9yTLqM+a6CZr8=
|
||||
github.com/btcsuite/btcutil/psbt v1.0.2/go.mod h1:LVveMu4VaNSkIRTZu2+ut0HDBRuYjqGocxDMNS1KuGQ=
|
||||
github.com/btcsuite/btcwallet v0.11.1-0.20200515224913-e0e62245ecbe h1:0m9uXDcnUc3Fv72635O/MfLbhbW+0hfSVgRiWezpkHU=
|
||||
github.com/btcsuite/btcwallet v0.11.1-0.20200515224913-e0e62245ecbe/go.mod h1:9+AH3V5mcTtNXTKe+fe63fDLKGOwQbZqmvOVUef+JFE=
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.0.0 h1:KGHMW5sd7yDdDMkCZ/JpP0KltolFsQcB973brBnfj4c=
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.0.0/go.mod h1:VufDts7bd/zs3GV13f/lXc/0lXrPnvxD/NvmpG/FEKU=
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.0.0 h1:2VsfS0sBedcM5KmDzRMT3+b6xobqWveZGvjb+jFez5w=
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.0.0/go.mod h1:UwQE78yCerZ313EXZwEiu3jNAtfXj2n2+c8RWiE/WNA=
|
||||
github.com/btcsuite/btcwallet/wallet/txsizes v1.0.0 h1:6DxkcoMnCPY4E9cUDPB5tbuuf40SmmMkSQkoE8vCT+s=
|
||||
github.com/btcsuite/btcwallet/wallet/txsizes v1.0.0/go.mod h1:pauEU8UuMFiThe5PB3EO+gO5kx87Me5NvdQDsTuq6cs=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.0.0/go.mod h1:bZTy9RyYZh9fLnSua+/CD48TJtYJSHjjYcSaszuxCCk=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.2.0/go.mod h1:9cwc1Yyg4uvd4ZdfdoMnALji+V9gfWSMfxEdLdR5Vwc=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.3.1 h1:lW1Ac3F1jJY4K11P+YQtRNcP5jFk27ASfrV7C6mvRU0=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.3.1/go.mod h1:9cwc1Yyg4uvd4ZdfdoMnALji+V9gfWSMfxEdLdR5Vwc=
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.0.0/go.mod h1:vc4gBprll6BP0UJ+AIGDaySoc7MdAmZf8kelfNb8CFY=
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.1.1-0.20200515224913-e0e62245ecbe h1:yQbJVYfsKbdqDQNLxd4hhiLSiMkIygefW5mSHMsdKpc=
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.1.1-0.20200515224913-e0e62245ecbe/go.mod h1:OwC0W0HhUszbWdvJvH6xvgabKSJ0lXl11YbmmqF9YXQ=
|
||||
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw=
|
||||
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
|
||||
github.com/btcsuite/golangcrypto v0.0.0-20150304025918-53f62d9b43e8/go.mod h1:tYvUd8KLhm/oXvUeSEs2VlLghFjQt9+ZaF9ghH0JNjc=
|
||||
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
|
||||
github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4=
|
||||
github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I=
|
||||
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
||||
github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE=
|
||||
github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc=
|
||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
|
||||
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY=
|
||||
github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNNP3dXwIq1lE=
|
||||
github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28=
|
||||
github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I=
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
|
||||
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
|
||||
github.com/frankban/quicktest v1.0.0/go.mod h1:R98jIehRai+d1/3Hv2//jOVCTJhW1VBavT6B6CuGq2k=
|
||||
github.com/frankban/quicktest v1.2.2 h1:xfmOhhoH5fGPgbEAlhLpJH9p0z/0Qizio9osmvn9IUY=
|
||||
github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
|
||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
|
||||
github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 h1:0IKlLyQ3Hs9nDaiK5cSHAGmcQEIC8l2Ts1u6x5Dfrqg=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.8.6/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.12.2 h1:D0EVSTwQoQOyfY35QNSuPJA4jpZRtkoGYWQMB7XNg5o=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.12.2/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/improbable-eng/grpc-web v0.12.0 h1:GlCS+lMZzIkfouf7CNqY+qqpowdKuJLSLLcKVfM1oLc=
|
||||
github.com/improbable-eng/grpc-web v0.12.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs=
|
||||
github.com/jackpal/gateway v1.0.5 h1:qzXWUJfuMdlLMtt0a3Dgt+xkWQiA5itDEITVJtuSwMc=
|
||||
github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA=
|
||||
github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad h1:heFfj7z0pGsNCekUlsFhO2jstxO4b5iQ665LjwM5mDc=
|
||||
github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
||||
github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag=
|
||||
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI=
|
||||
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c h1:3UvYABOQRhJAApj9MdCN+Ydv841ETSoy6xLzdmmr/9A=
|
||||
github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c/go.mod h1:nD0vlnrUjcjJhqN5WuCWZyzfd5AHZAC9/ajvbSx69xA=
|
||||
github.com/juju/errors v0.0.0-20190806202954-0232dcc7464d h1:hJXjZMxj0SWlMoQkzeZDLi2cmeiWKa7y1B8Rg+qaoEc=
|
||||
github.com/juju/errors v0.0.0-20190806202954-0232dcc7464d/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q=
|
||||
github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8 h1:UUHMLvzt/31azWTN/ifGWef4WUqvXk0iRqdhdy/2uzI=
|
||||
github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U=
|
||||
github.com/juju/retry v0.0.0-20180821225755-9058e192b216 h1:/eQL7EJQKFHByJe3DeE8Z36yqManj9UY5zppDoQi4FU=
|
||||
github.com/juju/retry v0.0.0-20180821225755-9058e192b216/go.mod h1:OohPQGsr4pnxwD5YljhQ+TZnuVRYpa5irjugL1Yuif4=
|
||||
github.com/juju/testing v0.0.0-20190723135506-ce30eb24acd2 h1:Pp8RxiF4rSoXP9SED26WCfNB28/dwTDpPXS8XMJR8rc=
|
||||
github.com/juju/testing v0.0.0-20190723135506-ce30eb24acd2/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA=
|
||||
github.com/juju/utils v0.0.0-20180820210520-bf9cc5bdd62d h1:irPlN9z5VCe6BTsqVsxheCZH99OFSmqSVyTigW4mEoY=
|
||||
github.com/juju/utils v0.0.0-20180820210520-bf9cc5bdd62d/go.mod h1:6/KLg8Wz/y2KVGWEpkK9vMNGkOnu4k/cqs8Z1fKjTOk=
|
||||
github.com/juju/version v0.0.0-20180108022336-b64dbd566305 h1:lQxPJ1URr2fjsKnJRt/BxiIxjLt9IKGvS+0injMHbag=
|
||||
github.com/juju/version v0.0.0-20180108022336-b64dbd566305/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
||||
github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec h1:n1NeQ3SgUHyISrjFFoO5dR748Is8dBL9qpaTNfphQrs=
|
||||
github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/lightninglabs/faraday v0.1.0-alpha.0.20200518080657-d3726a59507c h1:G78MLQTTo/rd3OrAOhxPAARB4jV3QaYBypzzU26s4Fs=
|
||||
github.com/lightninglabs/faraday v0.1.0-alpha.0.20200518080657-d3726a59507c/go.mod h1:glvtbUqfhcQ1qBwZ0JPaTyhB9BbLtfXBxLRsX1Dfsfg=
|
||||
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc=
|
||||
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk=
|
||||
github.com/lightninglabs/loop v0.6.0-beta/go.mod h1:Fo8mCfBnDfOpaisAB5moX/c/YK0q4NpSeaFrjRBrGvg=
|
||||
github.com/lightninglabs/loop v0.6.2-beta.0.20200528104150-c281cab8a036 h1:B3DPzDTDxJiU3zPzVR0CNKTT4tYP94b32wqLu6GocN4=
|
||||
github.com/lightninglabs/loop v0.6.2-beta.0.20200528104150-c281cab8a036/go.mod h1:uWmfHxQeFAVk0u5OJyMUS0CIbChUbY+b3Kj2xUhbQys=
|
||||
github.com/lightninglabs/neutrino v0.11.0/go.mod h1:CuhF0iuzg9Sp2HO6ZgXgayviFTn1QHdSTJlMncK80wg=
|
||||
github.com/lightninglabs/neutrino v0.11.1-0.20200316235139-bffc52e8f200 h1:j4iZ1XlUAPQmW6oSzMcJGILYsRHNs+4O3Gk+2Ms5Dww=
|
||||
github.com/lightninglabs/neutrino v0.11.1-0.20200316235139-bffc52e8f200/go.mod h1:MlZmoKa7CJP3eR1s5yB7Rm5aSyadpKkxqAwLQmog7N0=
|
||||
github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d/go.mod h1:KDb67YMzoh4eudnzClmvs2FbiLG9vxISmLApUkCa4uI=
|
||||
github.com/lightningnetwork/lightning-onion v1.0.2-0.20200501022730-3c8c8d0b89ea h1:oCj48NQ8u7Vz+MmzHqt0db6mxcFZo3Ho7M5gCJauY/k=
|
||||
github.com/lightningnetwork/lightning-onion v1.0.2-0.20200501022730-3c8c8d0b89ea/go.mod h1:rigfi6Af/KqsF7Za0hOgcyq2PNH4AN70AaMRxcJkff4=
|
||||
github.com/lightningnetwork/lnd v0.10.0-beta.rc6.0.20200528052558-24c865450a77 h1:t32xo5P25iCfcGTSuie1HlSKhMjhuT8sgKbrygd6XC8=
|
||||
github.com/lightningnetwork/lnd v0.10.0-beta.rc6.0.20200528052558-24c865450a77/go.mod h1:kfFdBokXXikGMWmAg7tVKMp5wqbSbUDtvi039Jd0fSM=
|
||||
github.com/lightningnetwork/lnd/cert v1.0.2 h1:g2rEu+sM2Uyz0bpfuvwri/ks6R/26H5iY1NcGbpDJ+c=
|
||||
github.com/lightningnetwork/lnd/cert v1.0.2/go.mod h1:fmtemlSMf5t4hsQmcprSoOykypAPp+9c+0d0iqTScMo=
|
||||
github.com/lightningnetwork/lnd/queue v1.0.1/go.mod h1:vaQwexir73flPW43Mrm7JOgJHmcEFBWWSl9HlyASoms=
|
||||
github.com/lightningnetwork/lnd/queue v1.0.3/go.mod h1:YTkTVZCxz8tAYreH27EO3s8572ODumWrNdYW2E/YKxg=
|
||||
github.com/lightningnetwork/lnd/queue v1.0.4 h1:8Dq3vxAFSACPy+pKN88oPFhuCpCoAAChPBwa4BJxH4k=
|
||||
github.com/lightningnetwork/lnd/queue v1.0.4/go.mod h1:YTkTVZCxz8tAYreH27EO3s8572ODumWrNdYW2E/YKxg=
|
||||
github.com/lightningnetwork/lnd/ticker v1.0.0 h1:S1b60TEGoTtCe2A0yeB+ecoj/kkS4qpwh6l+AkQEZwU=
|
||||
github.com/lightningnetwork/lnd/ticker v1.0.0/go.mod h1:iaLXJiVgI1sPANIF2qYYUJXjoksPNvGNYowB8aRbpX0=
|
||||
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw=
|
||||
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796/go.mod h1:3p7ZTf9V1sNPI5H8P3NkTFF4LuwMdPl2DodF60qAKqY=
|
||||
github.com/ltcsuite/ltcutil v0.0.0-20181217130922-17f3b04680b6/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mitranim/gow v0.0.0-20200310140433-1453861c60a5 h1:N3/iCEmJnqnS/eiK4Qf/VdzGHGq3NSaSaYWRZ9TcTYA=
|
||||
github.com/mitranim/gow v0.0.0-20200310140433-1453861c60a5/go.mod h1:Du3tFX2ohe7OugtDEVvBFqFpbAoHZTxv9I/+R7WO9vs=
|
||||
github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8 h1:PRMAcldsl4mXKJeRNB/KVNz6TlbS6hk2Rs42PqgU3Ws=
|
||||
github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76 h1:0xuRacu/Zr+jX+KyLLPPktbwXqyOvnOPUQmMLzX1jxU=
|
||||
github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA=
|
||||
github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
|
||||
|
|
@ -109,48 +257,91 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:
|
|||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U=
|
||||
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8=
|
||||
github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=
|
||||
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
|
||||
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.5.0 h1:1N5EYkVAPEywqZRJd7cwnRtCb6xJx7NH3T3WUTF980Q=
|
||||
github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 h1:tcJ6OjwOMvExLlzrAVZute09ocAGa7KqOON60++Gz4E=
|
||||
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02/go.mod h1:tHlrkM198S068ZqfrO6S8HsoJq2bF3ETfTL+kt4tInY=
|
||||
github.com/urfave/cli v1.18.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
|
||||
go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
|
||||
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A=
|
||||
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
||||
go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo=
|
||||
go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
|
||||
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d h1:2+ZP7EfsZV7Vvmx3TIqSlSzATMkTAKqM14YGFPoSKjI=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 h1:cg5LA/zNPRzIXIWSCxQW10Rvpy94aQh3LT/ShoCpkHw=
|
||||
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
|
|
@ -162,44 +353,85 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
|
|||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200406155108-e3b113bbe6a4 h1:c1Sgqkh8v6ZxafNGG64r8C8UisIW2TKMJN8P86tKjr0=
|
||||
golang.org/x/sys v0.0.0-20200406155108-e3b113bbe6a4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs=
|
||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
|
||||
google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c h1:hrpEMCZ2O7DR5gC1n2AJGVhrwiEjOi35+jxtIuZpTMo=
|
||||
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
|
||||
google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4=
|
||||
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v1 v1.0.1 h1:oQFRXzZ7CkBGdm1XZm/EbQYaYNNEElNBOd09M6cqNso=
|
||||
gopkg.in/errgo.v1 v1.0.1/go.mod h1:3NjfXwocQRYAPTq4/fzX+CwUhPRcR/azYRhj8G+LqMo=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/macaroon-bakery.v2 v2.0.1/go.mod h1:B4/T17l+ZWGwxFSZQmlBwp25x+og7OkhETfr3S9MbIA=
|
||||
gopkg.in/macaroon-bakery.v2 v2.1.0 h1:9Jw/+9XHBSutkaeVpWhDx38IcSNLJwWUICkOK98DHls=
|
||||
gopkg.in/macaroon-bakery.v2 v2.1.0/go.mod h1:B4/T17l+ZWGwxFSZQmlBwp25x+og7OkhETfr3S9MbIA=
|
||||
gopkg.in/macaroon.v2 v2.0.0/go.mod h1:+I6LnTMkm/uV5ew/0nsulNjL16SK4+C8yDmRUzHR17I=
|
||||
gopkg.in/macaroon.v2 v2.1.0 h1:HZcsjBCzq9t0eBPMKqTN/uSN6JOm78ZJ2INbqcBQOUI=
|
||||
gopkg.in/macaroon.v2 v2.1.0/go.mod h1:OUb+TQP/OP0WOerC2Jp/3CwhIKyIa9kQjuc7H24e6/o=
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
|
|
|
|||
128
log.go
Normal file
128
log.go
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
package shushtar
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/lightninglabs/faraday"
|
||||
"github.com/lightninglabs/faraday/dataset"
|
||||
"github.com/lightninglabs/faraday/fiat"
|
||||
"github.com/lightninglabs/faraday/frdrpc"
|
||||
"github.com/lightninglabs/faraday/recommend"
|
||||
"github.com/lightninglabs/faraday/revenue"
|
||||
"github.com/lightninglabs/loop"
|
||||
"github.com/lightninglabs/loop/lndclient"
|
||||
"github.com/lightninglabs/loop/loopdb"
|
||||
"github.com/lightninglabs/loop/lsat"
|
||||
"github.com/lightningnetwork/lnd"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
)
|
||||
|
||||
var (
|
||||
// log is a logger that is initialized with no output filters. This means the
|
||||
// package will not perform any logging by default until the caller requests
|
||||
// it.
|
||||
log btclog.Logger
|
||||
)
|
||||
|
||||
const (
|
||||
// Subsystem defines the logging code for this subsystem.
|
||||
Subsystem = "GRUB"
|
||||
|
||||
// GrpcLogSubsystem defines the logging code for the gRPC subsystem.
|
||||
GrpcLogSubsystem = "GRPC"
|
||||
|
||||
// levelDiffToGRPCLogger is the difference in numerical log level
|
||||
// definitions between the grpclog package and the btclog package.
|
||||
levelDiffToGRPCLogger = 2
|
||||
)
|
||||
|
||||
// The default amount of logging is none.
|
||||
func init() {
|
||||
UseLogger(build.NewSubLogger(Subsystem, nil))
|
||||
}
|
||||
|
||||
// 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 UseLogger(logger btclog.Logger) {
|
||||
log = logger
|
||||
}
|
||||
|
||||
// SetupLoggers initializes all package-global logger variables.
|
||||
func SetupLoggers(root *build.RotatingLogWriter) {
|
||||
// Add the GrUB logger.
|
||||
lnd.AddSubLogger(root, Subsystem, UseLogger)
|
||||
|
||||
// Add faraday loggers to lnd's root logger.
|
||||
lnd.AddSubLogger(root, faraday.Subsystem, faraday.UseLogger)
|
||||
lnd.AddSubLogger(root, recommend.Subsystem, recommend.UseLogger)
|
||||
lnd.AddSubLogger(root, dataset.Subsystem, dataset.UseLogger)
|
||||
lnd.AddSubLogger(root, frdrpc.Subsystem, frdrpc.UseLogger)
|
||||
lnd.AddSubLogger(root, revenue.Subsystem, revenue.UseLogger)
|
||||
lnd.AddSubLogger(root, fiat.Subsystem, fiat.UseLogger)
|
||||
|
||||
// Add loop loggers to lnd's root logger.
|
||||
lnd.AddSubLogger(root, "LOOPD", loopdb.UseLogger)
|
||||
lnd.AddSubLogger(root, "LOOP", loop.UseLogger)
|
||||
lnd.AddSubLogger(root, "LNDC", lndclient.UseLogger)
|
||||
lnd.AddSubLogger(root, "STORE", loopdb.UseLogger)
|
||||
lnd.AddSubLogger(root, lsat.Subsystem, lsat.UseLogger)
|
||||
}
|
||||
|
||||
// NewGrpcLogLogger creates a new grpclog compatible logger and attaches it as
|
||||
// a sub logger to the passed root logger.
|
||||
func NewGrpcLogLogger(root *build.RotatingLogWriter,
|
||||
subsystem string) *GrpcLogLogger {
|
||||
|
||||
logger := build.NewSubLogger(subsystem, root.GenSubLogger)
|
||||
lnd.SetSubLogger(root, subsystem, logger)
|
||||
return &GrpcLogLogger{
|
||||
Logger: logger,
|
||||
}
|
||||
}
|
||||
|
||||
// GrpcLogLogger is a wrapper around a btclog logger to make it compatible with
|
||||
// the grpclog logger package.
|
||||
type GrpcLogLogger struct {
|
||||
btclog.Logger
|
||||
}
|
||||
|
||||
func (l GrpcLogLogger) Infoln(args ...interface{}) {
|
||||
l.Logger.Error(args...)
|
||||
}
|
||||
|
||||
func (l GrpcLogLogger) Warning(args ...interface{}) {
|
||||
l.Logger.Warn(args...)
|
||||
}
|
||||
|
||||
func (l GrpcLogLogger) Warningln(args ...interface{}) {
|
||||
l.Logger.Warn(args...)
|
||||
}
|
||||
|
||||
func (l GrpcLogLogger) Warningf(format string, args ...interface{}) {
|
||||
l.Logger.Warnf(format, args...)
|
||||
}
|
||||
|
||||
func (l GrpcLogLogger) Errorln(args ...interface{}) {
|
||||
l.Logger.Error(args...)
|
||||
}
|
||||
|
||||
func (l GrpcLogLogger) Fatal(args ...interface{}) {
|
||||
l.Logger.Critical(args...)
|
||||
}
|
||||
|
||||
func (l GrpcLogLogger) Fatalln(args ...interface{}) {
|
||||
l.Logger.Critical(args...)
|
||||
}
|
||||
|
||||
func (l GrpcLogLogger) Fatalf(format string, args ...interface{}) {
|
||||
l.Logger.Criticalf(format, args...)
|
||||
}
|
||||
|
||||
func (l GrpcLogLogger) V(level int) bool {
|
||||
return level+levelDiffToGRPCLogger >= int(l.Logger.Level())
|
||||
}
|
||||
|
||||
// A compile-time check to make sure our GrpcLogLogger satisfies the
|
||||
// grpclog.LoggerV2 interface.
|
||||
var _ grpclog.LoggerV2 = (*GrpcLogLogger)(nil)
|
||||
88
proxy.go
88
proxy.go
|
|
@ -1,88 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus"
|
||||
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
|
||||
"github.com/improbable-eng/grpc-web/go/grpcweb"
|
||||
"github.com/mwitkow/grpc-proxy/proxy"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
func buildGrpcProxyServer(logger *logrus.Entry, grpcAddr string, secure bool) *grpcweb.WrappedGrpcServer {
|
||||
// gRPC-wide changes.
|
||||
grpc.EnableTracing = true
|
||||
grpc_logrus.ReplaceGrpcLogger(logger)
|
||||
|
||||
// gRPC proxy logic.
|
||||
backendConn := dialBackendOrFail(grpcAddr, secure)
|
||||
director := func(ctx context.Context, fullMethodName string) (context.Context, *grpc.ClientConn, error) {
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
outCtx, _ := context.WithCancel(ctx)
|
||||
mdCopy := md.Copy()
|
||||
|
||||
delete(mdCopy, "user-agent")
|
||||
// If this header is present in the request from the web client,
|
||||
// the actual connection to the backend will not be established.
|
||||
// https://github.com/improbable-eng/grpc-web/issues/568
|
||||
delete(mdCopy, "connection")
|
||||
outCtx = metadata.NewOutgoingContext(outCtx, mdCopy)
|
||||
return outCtx, backendConn, nil
|
||||
}
|
||||
// Server with logging and monitoring enabled.
|
||||
grpcServer := grpc.NewServer(
|
||||
grpc.CustomCodec(proxy.Codec()), // needed for proxy to function.
|
||||
grpc.UnknownServiceHandler(proxy.TransparentHandler(director)),
|
||||
// The current maximum receive msg size per https://github.com/grpc/grpc-go/blob/v1.8.2/server.go#L54
|
||||
grpc.MaxRecvMsgSize(1024*1024*4),
|
||||
grpc_middleware.WithUnaryServerChain(
|
||||
grpc_logrus.UnaryServerInterceptor(logger),
|
||||
grpc_prometheus.UnaryServerInterceptor,
|
||||
),
|
||||
grpc_middleware.WithStreamServerChain(
|
||||
grpc_logrus.StreamServerInterceptor(logger),
|
||||
grpc_prometheus.StreamServerInterceptor,
|
||||
),
|
||||
)
|
||||
options := []grpcweb.Option{
|
||||
grpcweb.WithCorsForRegisteredEndpointsOnly(false),
|
||||
grpcweb.WithOriginFunc(func(origin string) bool {
|
||||
// allow all CORS requests
|
||||
return true
|
||||
}),
|
||||
}
|
||||
|
||||
return grpcweb.WrapServer(grpcServer, options...)
|
||||
}
|
||||
|
||||
func dialBackendOrFail(grpcAddr string, secure bool) *grpc.ClientConn {
|
||||
opt := []grpc.DialOption{}
|
||||
opt = append(opt, grpc.WithCodec(proxy.Codec()))
|
||||
|
||||
if secure {
|
||||
tlsConfig := &tls.Config{}
|
||||
tlsConfig.MinVersion = tls.VersionTLS12
|
||||
tlsConfig.InsecureSkipVerify = true
|
||||
opt = append(opt, grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig)))
|
||||
} else {
|
||||
opt = append(opt, grpc.WithInsecure())
|
||||
}
|
||||
|
||||
opt = append(opt,
|
||||
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(1024*1024*4)),
|
||||
grpc.WithBackoffMaxDelay(grpc.DefaultBackoffConfig.MaxDelay),
|
||||
)
|
||||
|
||||
logrus.Infof("Dialing backend GRPC server at %s", grpcAddr)
|
||||
cc, err := grpc.Dial(grpcAddr, opt...)
|
||||
if err != nil {
|
||||
logrus.Fatalf("failed dialing backend: %v", err)
|
||||
}
|
||||
return cc
|
||||
}
|
||||
586
shushtar.go
Normal file
586
shushtar.go
Normal file
|
|
@ -0,0 +1,586 @@
|
|||
package shushtar
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
restProxy "github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/improbable-eng/grpc-web/go/grpcweb"
|
||||
"github.com/jessevdk/go-flags"
|
||||
"github.com/lightninglabs/faraday"
|
||||
"github.com/lightninglabs/faraday/frdrpc"
|
||||
"github.com/lightninglabs/loop/lndclient"
|
||||
"github.com/lightninglabs/loop/loopd"
|
||||
"github.com/lightninglabs/loop/looprpc"
|
||||
"github.com/lightningnetwork/lnd"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lntest/wait"
|
||||
"github.com/lightningnetwork/lnd/macaroons"
|
||||
"github.com/lightningnetwork/lnd/signal"
|
||||
"github.com/mwitkow/grpc-proxy/proxy"
|
||||
"github.com/rakyll/statik/fs"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/backoff"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"gopkg.in/macaroon.v2"
|
||||
|
||||
// Import generated go package that contains all static files for the
|
||||
// UI in a compressed format.
|
||||
_ "github.com/lightninglabs/shushtar/statik"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultHTTPSListen = "127.0.0.1:8443"
|
||||
defaultServerTimeout = 10 * time.Second
|
||||
defaultStartupTimeout = 5 * time.Second
|
||||
)
|
||||
|
||||
var (
|
||||
// maxMsgRecvSize is the largest message our REST proxy will receive. We
|
||||
// set this to 200MiB atm.
|
||||
maxMsgRecvSize = grpc.MaxCallRecvMsgSize(1 * 1024 * 1024 * 200)
|
||||
|
||||
lndDefaultConfig = lnd.DefaultConfig()
|
||||
faradayDefaultConfig = faraday.DefaultConfig()
|
||||
loopDefaultConfig = loopd.DefaultConfig()
|
||||
)
|
||||
|
||||
// Shushtar is the main grand unified binary instance. Its task is to start an
|
||||
// lnd node then start and register external subservers to it.
|
||||
type Shushtar struct {
|
||||
cfg *Config
|
||||
lndAddr string
|
||||
listenerCfg lnd.ListenerCfg
|
||||
|
||||
wg sync.WaitGroup
|
||||
lndErrChan chan error
|
||||
|
||||
lndClient *lndclient.GrpcLndServices
|
||||
lndGrpcServer *grpc.Server
|
||||
|
||||
faradayServer *frdrpc.RPCServer
|
||||
faradayStarted bool
|
||||
|
||||
loopServer *loopd.Daemon
|
||||
loopStarted bool
|
||||
|
||||
grpcWebProxy *grpc.Server
|
||||
httpServer *http.Server
|
||||
}
|
||||
|
||||
// New creates a new instance of the shushtar daemon.
|
||||
func New() *Shushtar {
|
||||
return &Shushtar{
|
||||
cfg: &Config{
|
||||
HTTPSListen: defaultHTTPSListen,
|
||||
Lnd: &lndDefaultConfig,
|
||||
Faraday: &faradayDefaultConfig,
|
||||
Loop: &loopDefaultConfig,
|
||||
},
|
||||
lndErrChan: make(chan error, 1),
|
||||
}
|
||||
}
|
||||
|
||||
// Run starts everything and then blocks until either the application is shut
|
||||
// down or a critical error happens.
|
||||
func (g *Shushtar) Run() error {
|
||||
// Pre-parse the command line options to pick up an alternative config
|
||||
// file.
|
||||
_, err := flags.Parse(g.cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Load the configuration, and parse any command line options. This
|
||||
// function will also set up logging properly.
|
||||
g.cfg.Lnd, err = loadLndConfig(g.cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Initiate our listeners. For now, we only support listening on one
|
||||
// port at a time because we can only pass in one pre-configured RPC
|
||||
// listener into lnd.
|
||||
if len(g.cfg.Lnd.RPCListeners) > 1 {
|
||||
return fmt.Errorf("grub only supports one RPC listener at a " +
|
||||
"time")
|
||||
}
|
||||
rpcAddr := g.cfg.Lnd.RPCListeners[0]
|
||||
g.listenerCfg = lnd.ListenerCfg{
|
||||
RPCListener: &lnd.ListenerWithSignal{
|
||||
Listener: &onDemandListener{addr: rpcAddr},
|
||||
Ready: make(chan struct{}),
|
||||
ExternalRPCSubserverCfg: &lnd.RPCSubserverConfig{
|
||||
Permissions: getSubserverPermissions(),
|
||||
Registrar: g,
|
||||
},
|
||||
ExternalRestRegistrar: g,
|
||||
},
|
||||
}
|
||||
|
||||
// With TLS enabled by default, we cannot call 0.0.0.0 internally when
|
||||
// dialing lnd as that IP address isn't in the cert. We need to rewrite
|
||||
// it to the loopback address.
|
||||
lndDialAddr := rpcAddr.String()
|
||||
switch {
|
||||
case strings.Contains(lndDialAddr, "0.0.0.0"):
|
||||
lndDialAddr = strings.Replace(
|
||||
lndDialAddr, "0.0.0.0", "127.0.0.1", 1,
|
||||
)
|
||||
|
||||
case strings.Contains(lndDialAddr, "[::]"):
|
||||
lndDialAddr = strings.Replace(
|
||||
lndDialAddr, "[::]", "[::1]", 1,
|
||||
)
|
||||
}
|
||||
g.lndAddr = lndDialAddr
|
||||
|
||||
// Some of the subservers' configuration options won't have any effect
|
||||
// (like the log or lnd options) as they will be taken from lnd's config
|
||||
// struct. Others we want to force to be the same as lnd so the user
|
||||
// doesn't have to set them manually, like the network for example.
|
||||
network, err := getNetwork(g.cfg.Lnd.Bitcoin)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
g.cfg.Loop.Network = network
|
||||
|
||||
// Create the instances of our subservers now so we can hook them up to
|
||||
// lnd once it's fully started.
|
||||
g.faradayServer = frdrpc.NewRPCServer(&frdrpc.Config{})
|
||||
g.loopServer = loopd.New(g.cfg.Loop, nil)
|
||||
|
||||
// Hook interceptor for os signals.
|
||||
signal.Intercept()
|
||||
|
||||
// Call the "real" main in a nested manner so the defers will properly
|
||||
// be executed in the case of a graceful shutdown.
|
||||
g.wg.Add(1)
|
||||
go func() {
|
||||
defer g.wg.Done()
|
||||
|
||||
err := lnd.Main(
|
||||
g.cfg.Lnd, g.listenerCfg, signal.ShutdownChannel(),
|
||||
)
|
||||
if e, ok := err.(*flags.Error); err != nil &&
|
||||
(!ok || e.Type != flags.ErrHelp) {
|
||||
|
||||
log.Errorf("Error running main lnd: %v", err)
|
||||
g.lndErrChan <- err
|
||||
return
|
||||
}
|
||||
|
||||
close(g.lndErrChan)
|
||||
}()
|
||||
defer func() {
|
||||
err := g.shutdown()
|
||||
if err != nil {
|
||||
log.Errorf("Error shutting down: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
// Wait for lnd to be unlocked, then start all clients.
|
||||
select {
|
||||
case <-g.listenerCfg.RPCListener.Ready:
|
||||
|
||||
case <-signal.ShutdownChannel():
|
||||
return errors.New("shutting down")
|
||||
}
|
||||
err = g.startSubservers(network)
|
||||
if err != nil {
|
||||
log.Errorf("Could not start subservers: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
err = g.startGrpcWebProxy()
|
||||
if err != nil {
|
||||
log.Errorf("Could not start gRPC web proxy server: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
// Now block until we receive an error or the main shutdown signal.
|
||||
select {
|
||||
case err := <-g.loopServer.ErrChan:
|
||||
// Loop will shut itself down if an error happens. We don't need
|
||||
// to try to stop it again.
|
||||
g.loopStarted = false
|
||||
log.Errorf("Received critical error from loop, shutting down: "+
|
||||
"%v", err)
|
||||
|
||||
case err := <-g.lndErrChan:
|
||||
if err != nil {
|
||||
log.Errorf("Received critical error from lnd, "+
|
||||
"shutting down: %v", err)
|
||||
}
|
||||
|
||||
case <-signal.ShutdownChannel():
|
||||
log.Infof("Shutdown signal received")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// startSubservers creates an internal connection to lnd and then starts all
|
||||
// embedded daemons as external subservers that hook into the same gRPC and REST
|
||||
// servers that lnd started.
|
||||
func (g *Shushtar) startSubservers(network string) error {
|
||||
var basicClient lnrpc.LightningClient
|
||||
|
||||
// The main RPC listener of lnd might need some time to start, it could
|
||||
// be that we run into a connection refused a few times.
|
||||
err := wait.NoError(func() error {
|
||||
// Create an lnd client now that we have the full configuration.
|
||||
// We'll need a basic client and a full client because not all
|
||||
// subservers have the same requirements.
|
||||
var err error
|
||||
basicClient, err = lndclient.NewBasicClient(
|
||||
g.lndAddr, g.cfg.Lnd.TLSCertPath,
|
||||
filepath.Dir(g.cfg.Lnd.AdminMacPath), network,
|
||||
lndclient.MacFilename(filepath.Base(
|
||||
g.cfg.Lnd.AdminMacPath,
|
||||
)),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
g.lndClient, err = lndclient.NewLndServices(
|
||||
&lndclient.LndServicesConfig{
|
||||
LndAddress: g.lndAddr,
|
||||
Network: network,
|
||||
MacaroonDir: filepath.Dir(g.cfg.Lnd.AdminMacPath),
|
||||
TLSPath: g.cfg.Lnd.TLSCertPath,
|
||||
},
|
||||
)
|
||||
return err
|
||||
|
||||
}, defaultStartupTimeout)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// The chain notifier also needs some time to start. Loop will subscribe
|
||||
// to the notifier and crash if it isn't ready yet, so we need to wait
|
||||
// here as a workaround.
|
||||
//
|
||||
// TODO(guggero): Remove once loop can retry itself.
|
||||
err = wait.NoError(func() error {
|
||||
ctxt, cancel := context.WithTimeout(
|
||||
context.Background(), defaultStartupTimeout,
|
||||
)
|
||||
defer cancel()
|
||||
|
||||
notifier := g.lndClient.ChainNotifier
|
||||
resChan, errChan, err := notifier.RegisterBlockEpochNtfn(
|
||||
ctxt,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Block until we get a positive/negative answer or the timeout
|
||||
// is reached.
|
||||
select {
|
||||
case <-resChan:
|
||||
return nil
|
||||
|
||||
case err := <-errChan:
|
||||
return err
|
||||
|
||||
case <-ctxt.Done():
|
||||
return fmt.Errorf("wait for chain notifier to be " +
|
||||
"ready timed out")
|
||||
}
|
||||
}, defaultStartupTimeout)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = g.faradayServer.StartAsSubserver(basicClient)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
g.faradayStarted = true
|
||||
|
||||
err = g.loopServer.StartAsSubserver(g.lndClient)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
g.loopStarted = true
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterGrpcSubserver is a callback on the lnd.SubserverConfig struct that is
|
||||
// called once lnd has initialized its main gRPC server instance. It gives the
|
||||
// daemons (or external subservers) the possibility to register themselves to
|
||||
// the same server instance.
|
||||
func (g *Shushtar) RegisterGrpcSubserver(grpcServer *grpc.Server) error {
|
||||
g.lndGrpcServer = grpcServer
|
||||
frdrpc.RegisterFaradayServerServer(grpcServer, g.faradayServer)
|
||||
looprpc.RegisterSwapClientServer(grpcServer, g.loopServer)
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterRestSubserver is a callback on the lnd.SubserverConfig struct that is
|
||||
// called once lnd has initialized its main REST server instance. It gives the
|
||||
// daemons (or external subservers) the possibility to register themselves to
|
||||
// the same server instance.
|
||||
func (g *Shushtar) RegisterRestSubserver(ctx context.Context,
|
||||
mux *restProxy.ServeMux, endpoint string,
|
||||
dialOpts []grpc.DialOption) error {
|
||||
|
||||
err := frdrpc.RegisterFaradayServerHandlerFromEndpoint(
|
||||
ctx, mux, endpoint, dialOpts,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return looprpc.RegisterSwapClientHandlerFromEndpoint(
|
||||
ctx, mux, endpoint, dialOpts,
|
||||
)
|
||||
}
|
||||
|
||||
// shutdown stops all subservers that were started and attached to lnd.
|
||||
func (g *Shushtar) shutdown() error {
|
||||
var returnErr error
|
||||
|
||||
if g.faradayStarted {
|
||||
err := g.faradayServer.Stop()
|
||||
if err != nil {
|
||||
log.Errorf("Error stopping faraday: %v", err)
|
||||
returnErr = err
|
||||
}
|
||||
}
|
||||
|
||||
if g.loopStarted {
|
||||
g.loopServer.Stop()
|
||||
err := <-g.loopServer.ErrChan
|
||||
if err != nil {
|
||||
log.Errorf("Error stopping loop: %v", err)
|
||||
returnErr = err
|
||||
}
|
||||
}
|
||||
|
||||
if g.lndClient != nil {
|
||||
g.lndClient.Close()
|
||||
}
|
||||
|
||||
if g.grpcWebProxy != nil {
|
||||
g.grpcWebProxy.Stop()
|
||||
err := g.httpServer.Close()
|
||||
if err != nil {
|
||||
log.Errorf("Error stopping loop: %v", err)
|
||||
returnErr = err
|
||||
}
|
||||
}
|
||||
|
||||
// In case the error wasn't thrown by lnd, make sure we stop it too.
|
||||
signal.RequestShutdown()
|
||||
|
||||
g.wg.Wait()
|
||||
|
||||
err := <-g.lndErrChan
|
||||
if err != nil {
|
||||
log.Errorf("Error stopping lnd: %v", err)
|
||||
returnErr = err
|
||||
}
|
||||
|
||||
return returnErr
|
||||
}
|
||||
|
||||
// startGrpcWebProxy creates a proxy that speaks gRPC web on one side and native
|
||||
// gRPC on the other side. This allows gRPC web requests from the browser to be
|
||||
// forwarded to lnd's native gRPC interface.
|
||||
func (g *Shushtar) startGrpcWebProxy() error {
|
||||
// Initialize the in-memory file server from the content compiled by
|
||||
// the statik library.
|
||||
statikFS, err := fs.New()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not load statik file system: %v", err)
|
||||
}
|
||||
staticFileServer := http.FileServer(statikFS)
|
||||
|
||||
// Create the gRPC web proxy that connects to lnd internally using the
|
||||
// admin macaroon and converts the browser's gRPC web calls into native
|
||||
// gRPC.
|
||||
lndGrpcServer, grpcServer, err := buildGrpcWebProxyServer(
|
||||
g.lndAddr, g.cfg.Lnd,
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create gRPC web proxy: %v", err)
|
||||
}
|
||||
g.grpcWebProxy = grpcServer
|
||||
|
||||
// Both gRPC (web) and static file requests will come into through the
|
||||
// main UI HTTP server. We use this simple switching handler to send the
|
||||
// requests to the correct implementation.
|
||||
httpHandler := func(resp http.ResponseWriter, req *http.Request) {
|
||||
// gRPC requests are easy to identify. Send them to the gRPC web
|
||||
// proxy.
|
||||
if lndGrpcServer.IsGrpcWebRequest(req) ||
|
||||
lndGrpcServer.IsGrpcWebSocketRequest(req) {
|
||||
|
||||
log.Infof("Handling gRPC request: %s", req.URL.Path)
|
||||
lndGrpcServer.ServeHTTP(resp, req)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// If we got here, it's a static file the browser wants, or
|
||||
// something we don't know in which case the static file server
|
||||
// will answer with a 404.
|
||||
log.Infof("Handling static file request: %s", req.URL.Path)
|
||||
staticFileServer.ServeHTTP(resp, req)
|
||||
}
|
||||
|
||||
// Create and start our HTTPS server now that will handle both gRPC web
|
||||
// and static file requests.
|
||||
g.httpServer = &http.Server{
|
||||
WriteTimeout: defaultServerTimeout,
|
||||
ReadTimeout: defaultServerTimeout,
|
||||
Handler: http.HandlerFunc(httpHandler),
|
||||
}
|
||||
httpListener, err := net.Listen("tcp", g.cfg.HTTPSListen)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to listen on %v: %v",
|
||||
g.cfg.HTTPSListen, err)
|
||||
}
|
||||
tlsConfig, err := buildTLSConfigForHttp2(g.cfg.Lnd)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to create TLS config: %v", err)
|
||||
}
|
||||
tlsListener := tls.NewListener(httpListener, tlsConfig)
|
||||
|
||||
g.wg.Add(1)
|
||||
go func() {
|
||||
defer g.wg.Done()
|
||||
|
||||
log.Infof("Listening for http_tls on: %v", tlsListener.Addr())
|
||||
err := g.httpServer.Serve(tlsListener)
|
||||
if err != nil && err != http.ErrServerClosed {
|
||||
log.Errorf("http_tls server error: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// buildGrpcWebProxyServer creates a gRPC server that will serve gRPC web to the
|
||||
// browser and translate all incoming gRPC web calls into native gRPC that are
|
||||
// then forwarded to lnd's RPC interface.
|
||||
func buildGrpcWebProxyServer(lndAddr string,
|
||||
config *lnd.Config) (*grpcweb.WrappedGrpcServer, *grpc.Server, error) {
|
||||
|
||||
// Apply gRPC-wide changes.
|
||||
grpc.EnableTracing = true
|
||||
grpclog.SetLoggerV2(NewGrpcLogLogger(
|
||||
config.LogWriter, GrpcLogSubsystem,
|
||||
))
|
||||
|
||||
// Setup the connection to lnd. GRPC web has a few kinks that need to be
|
||||
// addressed with a custom director that just takes care of a few HTTP
|
||||
// header fields.
|
||||
backendConn, err := dialLnd(lndAddr, config)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("could not dial lnd: %v", err)
|
||||
}
|
||||
director := newDirector(backendConn)
|
||||
|
||||
// Set up the final gRPC server that will serve gRPC web to the browser
|
||||
// and translate all incoming gRPC web calls into native gRPC that are
|
||||
// then forwarded to lnd's RPC interface.
|
||||
grpcServer := grpc.NewServer(
|
||||
grpc.CustomCodec(proxy.Codec()),
|
||||
grpc.UnknownServiceHandler(proxy.TransparentHandler(director)),
|
||||
)
|
||||
options := []grpcweb.Option{
|
||||
grpcweb.WithWebsockets(true),
|
||||
grpcweb.WithWebsocketPingInterval(2 * time.Minute),
|
||||
grpcweb.WithCorsForRegisteredEndpointsOnly(false),
|
||||
}
|
||||
return grpcweb.WrapServer(grpcServer, options...), grpcServer, nil
|
||||
}
|
||||
|
||||
// newDirector returns a new director function that fixes some common known
|
||||
// issues when using gRPC web from the browser.
|
||||
func newDirector(backendConn *grpc.ClientConn) proxy.StreamDirector {
|
||||
return func(ctx context.Context, fullMethodName string) (context.Context,
|
||||
*grpc.ClientConn, error) {
|
||||
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
mdCopy := md.Copy()
|
||||
|
||||
// If this header is present in the request from the web client,
|
||||
// the actual connection to the backend will not be established.
|
||||
// https://github.com/improbable-eng/grpc-web/issues/568
|
||||
delete(mdCopy, "connection")
|
||||
|
||||
outCtx := metadata.NewOutgoingContext(ctx, mdCopy)
|
||||
return outCtx, backendConn, nil
|
||||
}
|
||||
}
|
||||
|
||||
// dialLnd connects to lnd through the given address and uses the admin macaroon
|
||||
// to authenticate.
|
||||
func dialLnd(lndAddr string, config *lnd.Config) (*grpc.ClientConn, error) {
|
||||
dialAdminMac, err := readMacaroon(config.AdminMacPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not read admin macaroon: %v", err)
|
||||
}
|
||||
|
||||
tlsConfig, err := credentials.NewClientTLSFromFile(
|
||||
config.TLSCertPath, "",
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not read lnd TLS cert: %v", err)
|
||||
}
|
||||
|
||||
opt := []grpc.DialOption{
|
||||
dialAdminMac,
|
||||
grpc.WithCodec(proxy.Codec()), // nolint
|
||||
grpc.WithTransportCredentials(tlsConfig),
|
||||
grpc.WithDefaultCallOptions(maxMsgRecvSize),
|
||||
grpc.WithConnectParams(grpc.ConnectParams{
|
||||
Backoff: backoff.DefaultConfig,
|
||||
MinConnectTimeout: 5 * time.Second,
|
||||
}),
|
||||
}
|
||||
|
||||
log.Infof("Dialing lnd gRPC server at %s", lndAddr)
|
||||
cc, err := grpc.Dial(lndAddr, opt...)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed dialing backend: %v", err)
|
||||
}
|
||||
return cc, nil
|
||||
}
|
||||
|
||||
// readMacaroon tries to read the macaroon file at the specified path and create
|
||||
// gRPC dial options from it.
|
||||
func readMacaroon(macPath string) (grpc.DialOption, error) {
|
||||
// Load the specified macaroon file.
|
||||
macBytes, err := ioutil.ReadFile(macPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read macaroon path : %v", err)
|
||||
}
|
||||
|
||||
mac := &macaroon.Macaroon{}
|
||||
if err = mac.UnmarshalBinary(macBytes); err != nil {
|
||||
return nil, fmt.Errorf("unable to decode macaroon: %v", err)
|
||||
}
|
||||
|
||||
// Now we append the macaroon credentials to the dial options.
|
||||
cred := macaroons.NewMacaroonCredential(mac)
|
||||
return grpc.WithPerRPCCredentials(cred), nil
|
||||
}
|
||||
97
shustar.go
97
shustar.go
|
|
@ -1,97 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
_ "net/http/pprof" // register in DefaultServerMux
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"crypto/tls"
|
||||
|
||||
"github.com/mwitkow/go-conntrack"
|
||||
"github.com/mwitkow/go-conntrack/connhelpers"
|
||||
"github.com/sirupsen/logrus"
|
||||
_ "golang.org/x/net/trace" // register in DefaultServerMux
|
||||
)
|
||||
|
||||
func main() {
|
||||
config, err := loadConfig()
|
||||
if err != nil {
|
||||
logrus.Errorf("error loading config: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
logrus.SetOutput(os.Stdout)
|
||||
logEntry := logrus.NewEntry(logrus.StandardLogger())
|
||||
|
||||
errChan := make(chan error)
|
||||
|
||||
lndGrpcServer := buildGrpcProxyServer(logEntry, config.LNDHost, true)
|
||||
loopGrpcServer := buildGrpcProxyServer(logEntry, config.LoopHost, false)
|
||||
staticFileServer := http.FileServer(http.Dir("./app/build"))
|
||||
|
||||
httpHandler := func(resp http.ResponseWriter, req *http.Request) {
|
||||
if lndGrpcServer.IsGrpcWebRequest(req) {
|
||||
backend := req.Header.Get("X-Grpc-Backend")
|
||||
switch backend {
|
||||
case "lnd":
|
||||
logrus.Info("Handle LND GRPC request: ", req.URL.Path)
|
||||
lndGrpcServer.ServeHTTP(resp, req)
|
||||
case "loop":
|
||||
logrus.Info("Handle Loop GRPC request: ", req.URL.Path)
|
||||
loopGrpcServer.ServeHTTP(resp, req)
|
||||
default:
|
||||
resp.WriteHeader(500)
|
||||
resp.Write([]byte("HTTP header 'X-Grpc-Backend' is missing"))
|
||||
}
|
||||
} else {
|
||||
// fallback to static file hosting for client app
|
||||
logrus.Info("Handle static file request: ", req.URL.Path)
|
||||
staticFileServer.ServeHTTP(resp, req)
|
||||
}
|
||||
}
|
||||
httpServer := &http.Server{
|
||||
WriteTimeout: time.Second * 10,
|
||||
ReadTimeout: time.Second * 10,
|
||||
Handler: http.HandlerFunc(httpHandler),
|
||||
}
|
||||
httpListener := buildListenerOrFail("http", config.HTTPSListen)
|
||||
httpListener = tls.NewListener(httpListener, buildServerTLSOrFail(config))
|
||||
|
||||
go func() {
|
||||
logrus.Infof("Listening for http_tls on: %v", httpListener.Addr().String())
|
||||
if err := httpServer.Serve(httpListener); err != nil {
|
||||
errChan <- fmt.Errorf("http_tls server error: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
<-errChan
|
||||
}
|
||||
|
||||
func buildListenerOrFail(name string, addr string) net.Listener {
|
||||
listener, err := net.Listen("tcp", addr)
|
||||
if err != nil {
|
||||
logrus.Fatalf("failed listening for '%v' on %v: %v", name, addr, err)
|
||||
}
|
||||
return conntrack.NewListener(listener,
|
||||
conntrack.TrackWithName(name),
|
||||
conntrack.TrackWithTcpKeepAlive(20*time.Second),
|
||||
conntrack.TrackWithTracing(),
|
||||
)
|
||||
}
|
||||
|
||||
func buildServerTLSOrFail(config *config) *tls.Config {
|
||||
tlsConfig, err := connhelpers.TlsConfigForServerCerts(config.TLSCertPath, config.TLSKeyPath)
|
||||
if err != nil {
|
||||
logrus.Fatalf("failed reading TLS server keys: %v", err)
|
||||
}
|
||||
tlsConfig.MinVersion = tls.VersionTLS12
|
||||
tlsConfig.ClientAuth = tls.NoClientCert
|
||||
tlsConfig, err = connhelpers.TlsConfigWithHttp2Enabled(tlsConfig)
|
||||
if err != nil {
|
||||
logrus.Fatalf("can't configure h2 handling: %v", err)
|
||||
}
|
||||
return tlsConfig
|
||||
}
|
||||
13
statik/doc.go
Normal file
13
statik/doc.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
This package does not contain any source code by default other than this
|
||||
comment.
|
||||
|
||||
The web application's static assets (HTML, CSS, JS, images, etc.) will
|
||||
be packaged, compressed, then converted to go code and saved to a file called
|
||||
`statik.go` in this package during the build process.
|
||||
|
||||
Run the command `make statik-build` in the root directory to explicitly trigger
|
||||
that part of the build or simply run `make build` to build the entire
|
||||
application.
|
||||
*/
|
||||
package statik
|
||||
91
subserver_permissions.go
Normal file
91
subserver_permissions.go
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
package shushtar
|
||||
|
||||
import "gopkg.in/macaroon-bakery.v2/bakery"
|
||||
|
||||
var (
|
||||
// faradayPermissions is a map of all faraday RPC methods and their
|
||||
// required macaroon permissions.
|
||||
//
|
||||
// TODO(guggero): Move to faraday repo once macaroons are enabled there
|
||||
// and use more application specific permissions.
|
||||
faradayPermissions = map[string][]bakery.Op{
|
||||
"/frdrpc.FaradayServer/OutlierRecommendations": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/frdrpc.FaradayServer/ThresholdRecommendations": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/frdrpc.FaradayServer/RevenueReport": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/frdrpc.FaradayServer/ChannelInsights": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
}
|
||||
|
||||
// loopPermissions is a map of all loop RPC methods and their required
|
||||
// macaroon permissions.
|
||||
//
|
||||
// TODO(guggero): Move to loop repo once macaroons are enabled there
|
||||
// and use more application specific permissions.
|
||||
loopPermissions = map[string][]bakery.Op{
|
||||
"/looprpc.SwapClient/LoopOut": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/LoopIn": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/Monitor": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/ListSwaps": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/SwapInfo": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/LoopOutTerms": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/LoopOutQuote": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/GetLoopInTerms": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/GetLoopInQuote": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/GetLsatTokens": {{
|
||||
Entity: "offchain",
|
||||
Action: "read",
|
||||
}},
|
||||
}
|
||||
)
|
||||
|
||||
// getSubserverPermissions returns a merged map of all subserver macaroon
|
||||
// permissions.
|
||||
func getSubserverPermissions() map[string][]bakery.Op {
|
||||
mapSize := len(faradayPermissions) + len(loopPermissions)
|
||||
result := make(map[string][]bakery.Op, mapSize)
|
||||
for key, value := range faradayPermissions {
|
||||
result[key] = value
|
||||
}
|
||||
for key, value := range loopPermissions {
|
||||
result[key] = value
|
||||
}
|
||||
return result
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue