mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
multi: rename golang and make files to lightning-terminal
This commit is contained in:
parent
3efb0e9ba3
commit
33df4a1698
13 changed files with 58 additions and 49 deletions
|
|
@ -1,4 +1,4 @@
|
|||
app/build
|
||||
app/coverage
|
||||
app/node_modules
|
||||
shushtar-debug
|
||||
lightning-terminal-debug
|
||||
|
|
|
|||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -5,8 +5,8 @@ https.key
|
|||
# local environment vars to ignore
|
||||
.env*.local
|
||||
|
||||
shushtar-debug
|
||||
/shushtar-*
|
||||
lightning-terminal-debug
|
||||
/lightning-terminal-*
|
||||
|
||||
# go code generated by statik
|
||||
/statik/statik.go
|
||||
|
|
|
|||
14
Dockerfile
14
Dockerfile
|
|
@ -1,7 +1,7 @@
|
|||
FROM golang:1.13-alpine as builder
|
||||
|
||||
# Copy in the local repository to build from.
|
||||
COPY . /go/src/github.com/lightninglabs/shushtar
|
||||
COPY . /go/src/github.com/lightninglabs/lightning-terminal
|
||||
|
||||
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
|
||||
# queries required to connect to linked containers succeed.
|
||||
|
|
@ -12,7 +12,7 @@ ENV GO111MODULE on
|
|||
|
||||
ENV NODE_VERSION=v12.17.0
|
||||
|
||||
# Install dependencies and install/build shushtar.
|
||||
# Install dependencies and install/build lightning-terminal.
|
||||
RUN apk add --no-cache --update alpine-sdk \
|
||||
git \
|
||||
make \
|
||||
|
|
@ -27,7 +27,7 @@ RUN apk add --no-cache --update alpine-sdk \
|
|||
&& curl -o- -L https://yarnpkg.com/install.sh | bash \
|
||||
&& /bin/bash \
|
||||
&& . ~/.bashrc \
|
||||
&& cd /go/src/github.com/lightninglabs/shushtar \
|
||||
&& cd /go/src/github.com/lightninglabs/lightning-terminal \
|
||||
&& make install \
|
||||
&& go install -v -trimpath github.com/lightningnetwork/lnd/cmd/lncli \
|
||||
&& go install -v -trimpath github.com/lightninglabs/faraday/cmd/frcli \
|
||||
|
|
@ -39,11 +39,11 @@ FROM alpine as final
|
|||
# Define a root volume for data persistence.
|
||||
VOLUME /root/.lnd
|
||||
|
||||
# Expose shushtar and lnd ports (server, rpc).
|
||||
# Expose lightning-terminal and lnd ports (server, rpc).
|
||||
EXPOSE 8443 10009 9735
|
||||
|
||||
# Copy the binaries and entrypoint from the builder image.
|
||||
COPY --from=builder /go/bin/shushtar /bin/
|
||||
COPY --from=builder /go/bin/lightning-terminal /bin/
|
||||
COPY --from=builder /go/bin/lncli /bin/
|
||||
COPY --from=builder /go/bin/frcli /bin/
|
||||
COPY --from=builder /go/bin/loop /bin/
|
||||
|
|
@ -54,5 +54,5 @@ RUN apk add --no-cache \
|
|||
jq \
|
||||
ca-certificates
|
||||
|
||||
# Specify the start command and entrypoint as the shushtar daemon.
|
||||
ENTRYPOINT ["shushtar"]
|
||||
# Specify the start command and entrypoint as the lightning-terminal daemon.
|
||||
ENTRYPOINT ["lightning-terminal"]
|
||||
|
|
|
|||
18
Makefile
18
Makefile
|
|
@ -1,5 +1,5 @@
|
|||
PKG := github.com/lightninglabs/shushtar
|
||||
ESCPKG := github.com\/lightninglabs\/shushtar
|
||||
PKG := github.com/lightninglabs/lightning-terminal
|
||||
ESCPKG := github.com\/lightninglabs\/lightning-terminal
|
||||
LND_PKG := github.com/lightningnetwork/lnd
|
||||
|
||||
LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||
|
|
@ -41,7 +41,7 @@ include make/release_flags.mk
|
|||
# We only return the part inside the double quote here to avoid escape issues
|
||||
# when calling the external release script. The second parameter can be used to
|
||||
# add additional ldflags if needed (currently only used for the release).
|
||||
make_ldflags = $(2) -X $(LND_PKG)/build.Commit=shushtar-$(COMMIT) \
|
||||
make_ldflags = $(2) -X $(LND_PKG)/build.Commit=lightning-terminal-$(COMMIT) \
|
||||
-X $(LND_PKG)/build.CommitHash=$(COMMIT_HASH) \
|
||||
-X $(LND_PKG)/build.GoVersion=$(GOVERSION) \
|
||||
-X $(LND_PKG)/build.RawTags=$(shell echo $(1) | sed -e 's/ /,/g')
|
||||
|
|
@ -97,19 +97,19 @@ build: statik-build go-build
|
|||
install: statik-build go-install
|
||||
|
||||
go-build:
|
||||
@$(call print, "Building shushtar.")
|
||||
$(GOBUILD) -tags="$(LND_RELEASE_TAGS)" -ldflags "$(LDFLAGS)" -o shushtar-debug $(PKG)/cmd/shushtar
|
||||
@$(call print, "Building lightning-terminal.")
|
||||
$(GOBUILD) -tags="$(LND_RELEASE_TAGS)" -ldflags "$(LDFLAGS)" -o lightning-terminal-debug $(PKG)/cmd/lightning-terminal
|
||||
|
||||
go-install:
|
||||
@$(call print, "Installing shushtar.")
|
||||
$(GOINSTALL) -tags="$(LND_RELEASE_TAGS)" -ldflags "$(LDFLAGS)" $(PKG)/cmd/shushtar
|
||||
@$(call print, "Installing lightning-terminal.")
|
||||
$(GOINSTALL) -tags="$(LND_RELEASE_TAGS)" -ldflags "$(LDFLAGS)" $(PKG)/cmd/lightning-terminal
|
||||
|
||||
app-build: yarn-install
|
||||
@$(call print, "Building production app.")
|
||||
cd app; yarn build
|
||||
|
||||
release: statik-build
|
||||
@$(call print, "Creating release of shushtar.")
|
||||
@$(call print, "Creating release of lightning-terminal.")
|
||||
./release.sh build-release "$(VERSION_TAG)" "$(BUILD_SYSTEM)" "$(LND_RELEASE_TAGS)" "$(RELEASE_LDFLAGS)"
|
||||
|
||||
scratch: build
|
||||
|
|
@ -179,6 +179,6 @@ list:
|
|||
|
||||
clean:
|
||||
@$(call print, "Cleaning source.$(NC)")
|
||||
$(RM) ./shushtar-debug
|
||||
$(RM) ./lightning-terminal-debug
|
||||
$(RM) coverage.txt
|
||||
$(RM) -r statik
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/jessevdk/go-flags"
|
||||
"github.com/lightninglabs/shushtar"
|
||||
"github.com/lightninglabs/lightning-terminal"
|
||||
)
|
||||
|
||||
// main starts the shushtar application.
|
||||
// main starts the lightning-terminal application.
|
||||
func main() {
|
||||
err := shushtar.New().Run()
|
||||
err := terminal.New().Run()
|
||||
if e, ok := err.(*flags.Error); err != nil &&
|
||||
(!ok || e.Type != flags.ErrHelp) {
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package shushtar
|
||||
package terminal
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
|
|
@ -36,9 +36,9 @@ var (
|
|||
defaultLetsEncryptDir = "letsencrypt"
|
||||
)
|
||||
|
||||
// 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.
|
||||
// Config is the main configuration struct of lightning-terminal. 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"`
|
||||
UIPassword string `long:"uipassword" description:"the password that must be entered when using the loop UI. use a strong password to protect your node from unauthorized access through the web UI"`
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
|||
module github.com/lightninglabs/shushtar
|
||||
module github.com/lightninglabs/lightning-terminal
|
||||
|
||||
require (
|
||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
|
||||
|
|
|
|||
9
go.sum
9
go.sum
|
|
@ -1,4 +1,5 @@
|
|||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.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=
|
||||
|
|
@ -19,6 +20,7 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
|
|||
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/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=
|
||||
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=
|
||||
|
|
@ -86,6 +88,7 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe
|
|||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE=
|
||||
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=
|
||||
|
|
@ -136,6 +139,7 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
|
|||
github.com/grpc-ecosystem/grpc-gateway v1.8.6/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.3 h1:OCJlWkOUoTnl0neNGlf4fUm3TmbEtguw7vR+nGtnDjY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.3/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=
|
||||
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=
|
||||
|
|
@ -320,6 +324,7 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r
|
|||
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-20190108225652-1e06a53dbb7e/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=
|
||||
|
|
@ -329,6 +334,7 @@ golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLL
|
|||
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=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
|
@ -371,14 +377,17 @@ google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/
|
|||
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/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
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=
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
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=
|
||||
|
|
|
|||
2
gzip.go
2
gzip.go
|
|
@ -1,4 +1,4 @@
|
|||
package shushtar
|
||||
package terminal
|
||||
|
||||
import (
|
||||
"compress/gzip"
|
||||
|
|
|
|||
4
log.go
4
log.go
|
|
@ -1,4 +1,4 @@
|
|||
package shushtar
|
||||
package terminal
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btclog"
|
||||
|
|
@ -26,7 +26,7 @@ var (
|
|||
|
||||
const (
|
||||
// Subsystem defines the logging code for this subsystem.
|
||||
Subsystem = "GRUB"
|
||||
Subsystem = "LITD"
|
||||
|
||||
// GrpcLogSubsystem defines the logging code for the gRPC subsystem.
|
||||
GrpcLogSubsystem = "GRPC"
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
set -e
|
||||
|
||||
PKG="github.com/lightninglabs/shushtar"
|
||||
PKG="github.com/lightninglabs/lightning-terminal"
|
||||
LND_PKG="github.com/lightningnetwork/lnd"
|
||||
FARADAY_PKG="github.com/lightninglabs/faraday"
|
||||
LOOP_PKG="github.com/lightninglabs/loop"
|
||||
PACKAGE=shushtar
|
||||
PACKAGE=lightning-terminal
|
||||
|
||||
# green prints one line of green text (if the terminal supports it).
|
||||
function green() {
|
||||
|
|
@ -68,7 +68,7 @@ function build_release() {
|
|||
pushd "${dir}"
|
||||
|
||||
green " - Building: ${os} ${arch} ${arm} with build tags '${buildtags}'"
|
||||
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/shushtar
|
||||
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/lightning-terminal
|
||||
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${LND_PKG}/cmd/lncli
|
||||
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${FARADAY_PKG}/cmd/frcli
|
||||
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${LOOP_PKG}/cmd/loop
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package shushtar
|
||||
package terminal
|
||||
|
||||
import "gopkg.in/macaroon-bakery.v2/bakery"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package shushtar
|
||||
package terminal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
@ -42,7 +42,7 @@ import (
|
|||
|
||||
// Import generated go package that contains all static files for the
|
||||
// UI in a compressed format.
|
||||
_ "github.com/lightninglabs/shushtar/statik"
|
||||
_ "github.com/lightninglabs/lightning-terminal/statik"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -61,9 +61,9 @@ var (
|
|||
)
|
||||
)
|
||||
|
||||
// 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 {
|
||||
// LightningTerminal is the main grand unified binary instance. Its task is to
|
||||
// start an lnd node then start and register external subservers to it.
|
||||
type LightningTerminal struct {
|
||||
cfg *Config
|
||||
lndAddr string
|
||||
listenerCfg lnd.ListenerCfg
|
||||
|
|
@ -84,9 +84,9 @@ type Shushtar struct {
|
|||
httpServer *http.Server
|
||||
}
|
||||
|
||||
// New creates a new instance of the shushtar daemon.
|
||||
func New() *Shushtar {
|
||||
return &Shushtar{
|
||||
// New creates a new instance of the lightning-terminal daemon.
|
||||
func New() *LightningTerminal {
|
||||
return &LightningTerminal{
|
||||
cfg: defaultConfig(),
|
||||
lndErrChan: make(chan error, 1),
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ func New() *Shushtar {
|
|||
|
||||
// Run starts everything and then blocks until either the application is shut
|
||||
// down or a critical error happens.
|
||||
func (g *Shushtar) Run() error {
|
||||
func (g *LightningTerminal) Run() error {
|
||||
// Pre-parse the command line options to pick up an alternative config
|
||||
// file.
|
||||
_, err := flags.Parse(g.cfg)
|
||||
|
|
@ -109,7 +109,7 @@ func (g *Shushtar) Run() error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Validate the shushtar config options.
|
||||
// Validate the lightning-terminal config options.
|
||||
if g.cfg.LetsEncryptDir == "" {
|
||||
g.cfg.LetsEncryptDir = filepath.Join(
|
||||
g.cfg.Lnd.LndDir, defaultLetsEncryptDir,
|
||||
|
|
@ -253,7 +253,7 @@ func (g *Shushtar) Run() error {
|
|||
// 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 {
|
||||
func (g *LightningTerminal) startSubservers(network string) error {
|
||||
var basicClient lnrpc.LightningClient
|
||||
|
||||
// The main RPC listener of lnd might need some time to start, it could
|
||||
|
|
@ -344,7 +344,7 @@ func (g *Shushtar) startSubservers(network string) error {
|
|||
// 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 {
|
||||
func (g *LightningTerminal) RegisterGrpcSubserver(grpcServer *grpc.Server) error {
|
||||
g.lndGrpcServer = grpcServer
|
||||
frdrpc.RegisterFaradayServerServer(grpcServer, g.faradayServer)
|
||||
looprpc.RegisterSwapClientServer(grpcServer, g.loopServer)
|
||||
|
|
@ -355,7 +355,7 @@ func (g *Shushtar) RegisterGrpcSubserver(grpcServer *grpc.Server) error {
|
|||
// 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,
|
||||
func (g *LightningTerminal) RegisterRestSubserver(ctx context.Context,
|
||||
mux *restProxy.ServeMux, endpoint string,
|
||||
dialOpts []grpc.DialOption) error {
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ func (g *Shushtar) RegisterRestSubserver(ctx context.Context,
|
|||
}
|
||||
|
||||
// shutdown stops all subservers that were started and attached to lnd.
|
||||
func (g *Shushtar) shutdown() error {
|
||||
func (g *LightningTerminal) shutdown() error {
|
||||
var returnErr error
|
||||
|
||||
if g.faradayStarted {
|
||||
|
|
@ -422,7 +422,7 @@ func (g *Shushtar) shutdown() error {
|
|||
// 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 {
|
||||
func (g *LightningTerminal) startGrpcWebProxy() error {
|
||||
// Initialize the in-memory file server from the content compiled by
|
||||
// the statik library.
|
||||
statikFS, err := fs.New()
|
||||
Loading…
Add table
Add a link
Reference in a new issue