mirror of
https://github.com/lightninglabs/aperture.git
synced 2026-01-24 03:34:25 +01:00
Merge pull request #148 from ellemouton/slog
slog: update to use structured logs for hashmail server
This commit is contained in:
11
.github/workflows/main.yml
vendored
11
.github/workflows/main.yml
vendored
@@ -19,12 +19,7 @@ env:
|
||||
|
||||
# If you change this value, please change it in the following files as well:
|
||||
# /Dockerfile
|
||||
#
|
||||
# Don't bump this until go 1.19 is out (which should include a fix for
|
||||
# https://github.com/golang/go/issues/51799). There was a race condition
|
||||
# introduced with go 1.16.10 that causes the unit tests to fail (could also
|
||||
# happen in production).
|
||||
GO_VERSION: 1.22.6
|
||||
GO_VERSION: 1.23.6
|
||||
|
||||
jobs:
|
||||
########################
|
||||
@@ -70,7 +65,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: go cache
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /home/runner/work/go
|
||||
key: subasta-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
|
||||
@@ -107,7 +102,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: go cache
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /home/runner/work/go
|
||||
key: subasta-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
run:
|
||||
# timeout for analysis
|
||||
deadline: 4m
|
||||
timeout: 4m
|
||||
|
||||
# Linting uses a lot of memory. Keep it under control by only running a single
|
||||
# worker.
|
||||
concurrency: 1
|
||||
|
||||
linters-settings:
|
||||
govet:
|
||||
# Don't report about shadowed variables
|
||||
check-shadowing: false
|
||||
gofmt:
|
||||
# simplify code: gofmt with `-s` option, true by default
|
||||
simplify: true
|
||||
@@ -20,15 +17,14 @@ linters:
|
||||
# the latest linter includes many sub-linters which do not pass the codebase.
|
||||
enable:
|
||||
- bodyclose
|
||||
- copyloopvar
|
||||
- dupl
|
||||
- errcheck
|
||||
- exportloopref
|
||||
- goconst
|
||||
- gocritic
|
||||
- gocyclo
|
||||
- gofmt
|
||||
- goimports
|
||||
- golint
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.22.6-alpine as builder
|
||||
FROM golang:1.23.6-alpine as builder
|
||||
|
||||
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
|
||||
# queries required to connect to linked containers succeed.
|
||||
|
||||
2
Makefile
2
Makefile
@@ -58,7 +58,7 @@ build:
|
||||
|
||||
install:
|
||||
@$(call print, "Installing aperture.")
|
||||
$(GOINSTALL) $(PKG)/cmd/aperture
|
||||
$(GOINSTALL) -tags="${tags}" $(PKG)/cmd/aperture
|
||||
|
||||
docker-tools:
|
||||
@$(call print, "Building tools docker image.")
|
||||
|
||||
14
aperture.go
14
aperture.go
@@ -16,6 +16,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/goccy/go-yaml"
|
||||
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
|
||||
gateway "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
flags "github.com/jessevdk/go-flags"
|
||||
@@ -42,7 +43,6 @@ import (
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -202,7 +202,7 @@ func (a *Aperture) Start(errChan chan error) error {
|
||||
|
||||
// Enable http profiling and validate profile port number if requested.
|
||||
if a.cfg.Profile != 0 {
|
||||
if a.cfg.Profile < 1024 || a.cfg.Profile > 65535 {
|
||||
if a.cfg.Profile < 1024 {
|
||||
return fmt.Errorf("the profile port must be between " +
|
||||
"1024 and 65535")
|
||||
}
|
||||
@@ -619,7 +619,10 @@ func setupLogging(cfg *Config, interceptor signal.Interceptor) error {
|
||||
}
|
||||
|
||||
// Now initialize the logger and set the log level.
|
||||
SetupLoggers(logWriter, interceptor)
|
||||
sugLogMgr := build.NewSubLoggerManager(
|
||||
build.NewDefaultLogHandlers(cfg.Logging, logWriter)...,
|
||||
)
|
||||
SetupLoggers(sugLogMgr, interceptor)
|
||||
|
||||
// Use our default data dir unless a base dir is set.
|
||||
logFile := filepath.Join(apertureDataDir, defaultLogFilename)
|
||||
@@ -628,12 +631,13 @@ func setupLogging(cfg *Config, interceptor signal.Interceptor) error {
|
||||
}
|
||||
|
||||
err := logWriter.InitLogRotator(
|
||||
logFile, defaultMaxLogFileSize, defaultMaxLogFiles,
|
||||
cfg.Logging.File, logFile,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return build.ParseAndSetDebugLevels(cfg.DebugLevel, logWriter)
|
||||
|
||||
return build.ParseAndSetDebugLevels(cfg.DebugLevel, sugLogMgr)
|
||||
}
|
||||
|
||||
// getTLSConfig returns a TLS configuration for either a self-signed certificate
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package aperturedb
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
)
|
||||
|
||||
// Subsystem defines the logging code for this subsystem.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package challenger
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/lightninglabs/aperture/aperturedb"
|
||||
"github.com/lightninglabs/aperture/proxy"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -18,8 +19,6 @@ var (
|
||||
defaultTLSCertFilename = "tls.cert"
|
||||
defaultLogLevel = "info"
|
||||
defaultLogFilename = "aperture.log"
|
||||
defaultMaxLogFiles = 3
|
||||
defaultMaxLogFileSize = 10
|
||||
defaultInvoiceBatchSize = 100000
|
||||
|
||||
defaultSqliteDatabaseFileName = "aperture.db"
|
||||
@@ -224,6 +223,9 @@ type Config struct {
|
||||
// InvoiceBatchSize is the number of invoices to fetch in a single
|
||||
// request.
|
||||
InvoiceBatchSize int `long:"invoicebatchsize" description:"The number of invoices to fetch in a single request."`
|
||||
|
||||
// Logging controls various aspects of aperture logging.
|
||||
Logging *build.LogConfig `group:"logging" namespace:"logging"`
|
||||
}
|
||||
|
||||
func (c *Config) validate() error {
|
||||
@@ -244,7 +246,7 @@ func (c *Config) validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DefaultConfig returns the default configuration for a sqlite backend.
|
||||
// DefaultSqliteConfig returns the default configuration for a sqlite backend.
|
||||
func DefaultSqliteConfig() *aperturedb.SqliteConfig {
|
||||
return &aperturedb.SqliteConfig{
|
||||
SkipMigrations: false,
|
||||
@@ -267,5 +269,6 @@ func NewConfig() *Config {
|
||||
ReadTimeout: defaultReadTimeout,
|
||||
WriteTimeout: defaultWriteTimeout,
|
||||
InvoiceBatchSize: defaultInvoiceBatchSize,
|
||||
Logging: build.DefaultLogConfig(),
|
||||
}
|
||||
}
|
||||
|
||||
42
go.mod
42
go.mod
@@ -1,17 +1,16 @@
|
||||
module github.com/lightninglabs/aperture
|
||||
|
||||
go 1.22.6
|
||||
|
||||
toolchain go1.22.7
|
||||
go 1.23.6
|
||||
|
||||
require (
|
||||
github.com/btcsuite/btcd v0.24.3-0.20240921052913-67b8efd3ba53
|
||||
github.com/btcsuite/btcd v0.24.3-0.20241210095828-e646d437e95b
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.4
|
||||
github.com/btcsuite/btcd/btcutil v1.1.5
|
||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
|
||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.5.3
|
||||
github.com/btcsuite/btclog/v2 v2.0.1-0.20250110154127-3ae4bf1cb318
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.5.4
|
||||
github.com/fortytw2/leaktest v1.3.0
|
||||
github.com/goccy/go-yaml v1.15.23
|
||||
github.com/golang-migrate/migrate/v4 v4.17.0
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0
|
||||
@@ -21,12 +20,12 @@ require (
|
||||
github.com/lib/pq v1.10.9
|
||||
github.com/lightninglabs/lightning-node-connect v0.2.5-alpha
|
||||
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.2
|
||||
github.com/lightninglabs/lndclient v0.18.4-0
|
||||
github.com/lightningnetwork/lnd v0.18.3-beta.rc3.0.20241011124628-ca3bde901eb8
|
||||
github.com/lightninglabs/lndclient v0.19.0-2
|
||||
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250304192711-9feb761b4ec4
|
||||
github.com/lightningnetwork/lnd/cert v1.2.2
|
||||
github.com/lightningnetwork/lnd/clock v1.1.1
|
||||
github.com/lightningnetwork/lnd/tlv v1.2.6
|
||||
github.com/lightningnetwork/lnd/tor v1.1.2
|
||||
github.com/lightningnetwork/lnd/tlv v1.3.0
|
||||
github.com/lightningnetwork/lnd/tor v1.1.4
|
||||
github.com/mwitkow/grpc-proxy v0.0.0-20230212185441-f345521cb9c9
|
||||
github.com/ory/dockertest/v3 v3.10.0
|
||||
github.com/prometheus/client_golang v1.11.1
|
||||
@@ -40,7 +39,6 @@ require (
|
||||
google.golang.org/protobuf v1.33.0
|
||||
gopkg.in/macaroon-bakery.v2 v2.1.0
|
||||
gopkg.in/macaroon.v2 v2.1.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
modernc.org/sqlite v1.29.10
|
||||
)
|
||||
|
||||
@@ -56,11 +54,12 @@ require (
|
||||
github.com/aead/siphash v1.0.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/btcsuite/btcd/btcutil/psbt v1.1.8 // indirect
|
||||
github.com/btcsuite/btcwallet v0.16.10-0.20240809133323-7d3434c65ae2 // indirect
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.4 // indirect
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.2.1 // indirect
|
||||
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.4 // indirect
|
||||
github.com/btcsuite/btcwallet/walletdb v1.4.2 // indirect
|
||||
github.com/btcsuite/btclog v0.0.0-20241003133417-09c4e92e319c // indirect
|
||||
github.com/btcsuite/btcwallet v0.16.10-0.20241127094224-93c858b2ad63 // indirect
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5 // indirect
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.2.2 // indirect
|
||||
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.5 // indirect
|
||||
github.com/btcsuite/btcwallet/walletdb v1.4.4 // indirect
|
||||
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
|
||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect
|
||||
github.com/btcsuite/winsvc v1.0.0 // indirect
|
||||
@@ -120,11 +119,11 @@ require (
|
||||
github.com/lightninglabs/neutrino v0.16.1-0.20240425105051-602843d34ffd // indirect
|
||||
github.com/lightninglabs/neutrino/cache v1.1.2 // indirect
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb // indirect
|
||||
github.com/lightningnetwork/lnd/fn v1.2.1 // indirect
|
||||
github.com/lightningnetwork/lnd/healthcheck v1.2.5 // indirect
|
||||
github.com/lightningnetwork/lnd/kvdb v1.4.10 // indirect
|
||||
github.com/lightningnetwork/lnd/fn/v2 v2.0.8 // indirect
|
||||
github.com/lightningnetwork/lnd/healthcheck v1.2.6 // indirect
|
||||
github.com/lightningnetwork/lnd/kvdb v1.4.12 // indirect
|
||||
github.com/lightningnetwork/lnd/queue v1.1.1 // indirect
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.4 // indirect
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.7 // indirect
|
||||
github.com/lightningnetwork/lnd/ticker v1.1.1 // indirect
|
||||
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
@@ -160,7 +159,7 @@ require (
|
||||
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
|
||||
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
|
||||
go.etcd.io/bbolt v1.3.7 // indirect
|
||||
go.etcd.io/bbolt v1.3.11 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect
|
||||
go.etcd.io/etcd/client/v2 v2.305.7 // indirect
|
||||
@@ -189,6 +188,7 @@ require (
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
|
||||
gopkg.in/errgo.v1 v1.0.1 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
|
||||
modernc.org/libc v1.49.3 // indirect
|
||||
|
||||
73
go.sum
73
go.sum
@@ -71,8 +71,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
|
||||
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
|
||||
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M=
|
||||
github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A=
|
||||
github.com/btcsuite/btcd v0.24.3-0.20240921052913-67b8efd3ba53 h1:XOZ/wRGHkKv0AqxfDks5IkzaQ1Ge6fq322ZOOG5VIkU=
|
||||
github.com/btcsuite/btcd v0.24.3-0.20240921052913-67b8efd3ba53/go.mod h1:zHK7t7sw8XbsCkD64WePHE3r3k9/XoGAcf6mXV14c64=
|
||||
github.com/btcsuite/btcd v0.24.3-0.20241210095828-e646d437e95b h1:VQoobSrWdxICuqFU3tKVu/Lzk7BTk9SsCgRr5dUvC70=
|
||||
github.com/btcsuite/btcd v0.24.3-0.20241210095828-e646d437e95b/go.mod h1:zHK7t7sw8XbsCkD64WePHE3r3k9/XoGAcf6mXV14c64=
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA=
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ=
|
||||
@@ -87,21 +87,24 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtyd
|
||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ=
|
||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
||||
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/btclog v0.0.0-20241003133417-09c4e92e319c h1:4HxD1lBUGUddhzgaNgrCPsFWd7cGYNpeFUgd9ZIgyM0=
|
||||
github.com/btcsuite/btclog v0.0.0-20241003133417-09c4e92e319c/go.mod h1:w7xnGOhwT3lmrS4H3b/D1XAXxvh+tbhUm8xeHN2y3TQ=
|
||||
github.com/btcsuite/btclog/v2 v2.0.1-0.20250110154127-3ae4bf1cb318 h1:oCjIcinPt7XQ644MP/22JcjYEC84qRc3bRBH0d7Hhd4=
|
||||
github.com/btcsuite/btclog/v2 v2.0.1-0.20250110154127-3ae4bf1cb318/go.mod h1:XItGUfVOxotJL8kkuk2Hj3EVow5KCugXl3wWfQ6K0AE=
|
||||
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||
github.com/btcsuite/btcwallet v0.16.10-0.20240809133323-7d3434c65ae2 h1:qa4Avm7p97JroZZyMJADbEb9u853pjleJYSeitENvLc=
|
||||
github.com/btcsuite/btcwallet v0.16.10-0.20240809133323-7d3434c65ae2/go.mod h1:X2xDre+j1QphTRo54y2TikUzeSvreL1t1aMXrD8Kc5A=
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.4 h1:poyHFf7+5+RdxNp5r2T6IBRD7RyraUsYARYbp/7t4D8=
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.4/go.mod h1:GETGDQuyq+VFfH1S/+/7slLM/9aNa4l7P4ejX6dJfb0=
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.2.1 h1:UZo7YRzdHbwhK7Rhv3PO9bXgTxiOH45edK5qdsdiatk=
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.2.1/go.mod h1:MVSqRkju/IGxImXYPfBkG65FgEZYA4fXchheILMVl8g=
|
||||
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.4 h1:nmcKAVTv/cmYrs0A4hbiC6Qw+WTLYy/14SmTt3mLnCo=
|
||||
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.4/go.mod h1:YqJR8WAAHiKIPesZTr9Cx9Az4fRhRLcJ6GcxzRUZCAc=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.4.2 h1:zwZZ+zaHo4mK+FAN6KeK85S3oOm+92x2avsHvFAhVBE=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.4.2/go.mod h1:7ZQ+BvOEre90YT7eSq8bLoxTsgXidUzA/mqbRS114CQ=
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.5.3 h1:QrWCio9Leh3DwkWfp+A1SURj8pYn3JuTLv3waP5uEro=
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.5.3/go.mod h1:M4nQpxGTXiDlSOODKXboXX7NFthmiBNjzAKKNS7Fhjg=
|
||||
github.com/btcsuite/btcwallet v0.16.10-0.20241127094224-93c858b2ad63 h1:YN+PekOLlLoGxE3P5RJaGgodZD5DDJSU8eXQZVwwCxM=
|
||||
github.com/btcsuite/btcwallet v0.16.10-0.20241127094224-93c858b2ad63/go.mod h1:1HJXYbjJzgumlnxOC2+ViR1U+gnHWoOn7WeK5OfY1eU=
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5 h1:Rr0njWI3r341nhSPesKQ2JF+ugDSzdPoeckS75SeDZk=
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5/go.mod h1:+tXJ3Ym0nlQc/iHSwW1qzjmPs3ev+UVWMbGgfV1OZqU=
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.2.2 h1:YEO+Lx1ZJJAtdRrjuhXjWrYsmAk26wLTlNzxt2q0lhk=
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.2.2/go.mod h1:4v+grppsDpVn91SJv+mZT7B8hEV4nSmpREM4I8Uohws=
|
||||
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.5 h1:93o5Xz9dYepBP4RMFUc9RGIFXwqP2volSWRkYJFrNtI=
|
||||
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.5/go.mod h1:lQ+e9HxZ85QP7r3kdxItkiMSloSLg1PEGis5o5CXUQw=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.4.4 h1:BDel6iT/ltYSIYKs0YbjwnEDi7xR3yzABIsQxN2F1L8=
|
||||
github.com/btcsuite/btcwallet/walletdb v1.4.4/go.mod h1:jk/hvpLFINF0C1kfTn0bfx2GbnFT+Nvnj6eblZALfjs=
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.5.4 h1:hJjHy1h/dJwSfD9uDsCwcH21D1iOrus6OrI5gR9E/O0=
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.5.4/go.mod h1:lAv0b1Vj9Ig5U8QFm0yiJ9WqPl8yGO/6l7JxdHY1PKE=
|
||||
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=
|
||||
@@ -241,6 +244,8 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
|
||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
github.com/goccy/go-yaml v1.15.23 h1:WS0GAX1uNPDLUvLkNU2vXq6oTnsmfVFocjQ/4qA48qo=
|
||||
github.com/goccy/go-yaml v1.15.23/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=
|
||||
@@ -474,8 +479,8 @@ github.com/lightninglabs/lightning-node-connect v0.2.5-alpha h1:ZRVChwczFXK0CEbx
|
||||
github.com/lightninglabs/lightning-node-connect v0.2.5-alpha/go.mod h1:A9Pof9fETkH+F67BnOmrBDThPKstqp73wlImWOZvTXQ=
|
||||
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.2 h1:Er1miPZD2XZwcfE4xoS5AILqP1mj7kqnhbBSxW9BDxY=
|
||||
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.2/go.mod h1:antQGRDRJiuyQF6l+k6NECCSImgCpwaZapATth2Chv4=
|
||||
github.com/lightninglabs/lndclient v0.18.4-0 h1:TdorvV9UIw3fjZrNpVKn3fpsOdw2KWF2Eqdx7+++lcY=
|
||||
github.com/lightninglabs/lndclient v0.18.4-0/go.mod h1:LbINSPfKEdZuTGqqJ+ZmUxXWNvUCaDqrZeJ7/Al0Z3Y=
|
||||
github.com/lightninglabs/lndclient v0.19.0-2 h1:ZLGit6BfbBDQFLy/TjiYcJYvgrZqGGfppQPIPdMNSqM=
|
||||
github.com/lightninglabs/lndclient v0.19.0-2/go.mod h1:pr0YzsASgtWkekVODJyU3Cpo3QQ0d7Zm7+SlejywxDM=
|
||||
github.com/lightninglabs/neutrino v0.16.1-0.20240425105051-602843d34ffd h1:D8aRocHpoCv43hL8egXEMYyPmyOiefFHZ66338KQB2s=
|
||||
github.com/lightninglabs/neutrino v0.16.1-0.20240425105051-602843d34ffd/go.mod h1:x3OmY2wsA18+Kc3TSV2QpSUewOCiscw2mKpXgZv2kZk=
|
||||
github.com/lightninglabs/neutrino/cache v1.1.2 h1:C9DY/DAPaPxbFC+xNNEI/z1SJY9GS3shmlu5hIQ798g=
|
||||
@@ -484,28 +489,28 @@ github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display h1:pRdza2wl
|
||||
github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb h1:yfM05S8DXKhuCBp5qSMZdtSwvJ+GFzl94KbXMNB1JDY=
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI=
|
||||
github.com/lightningnetwork/lnd v0.18.3-beta.rc3.0.20241011124628-ca3bde901eb8 h1:+z0s8M0QItH51qMPgFGlRvi6uBltbURQj6u1srTyRb4=
|
||||
github.com/lightningnetwork/lnd v0.18.3-beta.rc3.0.20241011124628-ca3bde901eb8/go.mod h1:gzVQkOCZxTLzlUPqnI6t68FVGLbiO6Jj+TcLb4b78n0=
|
||||
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250304192711-9feb761b4ec4 h1:3UfT25sO71q3V7RSb/wE0ruiwk3ex30h7ZvPZ0O2Z80=
|
||||
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250304192711-9feb761b4ec4/go.mod h1:5fYMAma+ylPOV+wycJuxSIwPLyRYRqKZTfiqk+59c+s=
|
||||
github.com/lightningnetwork/lnd/cert v1.2.2 h1:71YK6hogeJtxSxw2teq3eGeuy4rHGKcFf0d0Uy4qBjI=
|
||||
github.com/lightningnetwork/lnd/cert v1.2.2/go.mod h1:jQmFn/Ez4zhDgq2hnYSw8r35bqGVxViXhX6Cd7HXM6U=
|
||||
github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0=
|
||||
github.com/lightningnetwork/lnd/clock v1.1.1/go.mod h1:mGnAhPyjYZQJmebS7aevElXKTFDuO+uNFFfMXK1W8xQ=
|
||||
github.com/lightningnetwork/lnd/fn v1.2.1 h1:pPsVGrwi9QBwdLJzaEGK33wmiVKOxs/zc8H7+MamFf0=
|
||||
github.com/lightningnetwork/lnd/fn v1.2.1/go.mod h1:SyFohpVrARPKH3XVAJZlXdVe+IwMYc4OMAvrDY32kw0=
|
||||
github.com/lightningnetwork/lnd/healthcheck v1.2.5 h1:aTJy5xeBpcWgRtW/PGBDe+LMQEmNm/HQewlQx2jt7OA=
|
||||
github.com/lightningnetwork/lnd/healthcheck v1.2.5/go.mod h1:G7Tst2tVvWo7cx6mSBEToQC5L1XOGxzZTPB29g9Rv2I=
|
||||
github.com/lightningnetwork/lnd/kvdb v1.4.10 h1:vK89IVv1oVH9ubQWU+EmoCQFeVRaC8kfmOrqHbY5zoY=
|
||||
github.com/lightningnetwork/lnd/kvdb v1.4.10/go.mod h1:J2diNABOoII9UrMnxXS5w7vZwP7CA1CStrl8MnIrb3A=
|
||||
github.com/lightningnetwork/lnd/fn/v2 v2.0.8 h1:r2SLz7gZYQPVc3IZhU82M66guz3Zk2oY+Rlj9QN5S3g=
|
||||
github.com/lightningnetwork/lnd/fn/v2 v2.0.8/go.mod h1:TOzwrhjB/Azw1V7aa8t21ufcQmdsQOQMDtxVOQWNl8s=
|
||||
github.com/lightningnetwork/lnd/healthcheck v1.2.6 h1:1sWhqr93GdkWy4+6U7JxBfcyZIE78MhIHTJZfPx7qqI=
|
||||
github.com/lightningnetwork/lnd/healthcheck v1.2.6/go.mod h1:Mu02um4CWY/zdTOvFje7WJgJcHyX2zq/FG3MhOAiGaQ=
|
||||
github.com/lightningnetwork/lnd/kvdb v1.4.12 h1:Y0WY5Tbjyjn6eCYh068qkWur5oFtioJlfxc8w5SlJeQ=
|
||||
github.com/lightningnetwork/lnd/kvdb v1.4.12/go.mod h1:hx9buNcxsZpZwh8m1sjTQwy2SOeBoWWOZ3RnOQkMsxI=
|
||||
github.com/lightningnetwork/lnd/queue v1.1.1 h1:99ovBlpM9B0FRCGYJo6RSFDlt8/vOkQQZznVb18iNMI=
|
||||
github.com/lightningnetwork/lnd/queue v1.1.1/go.mod h1:7A6nC1Qrm32FHuhx/mi1cieAiBZo5O6l8IBIoQxvkz4=
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.4 h1:9cMwPxcrLQG8UmyZO4q8SpR7NmxSwBMbj3AispdcwHg=
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.4/go.mod h1:4cQOkdymlZ1znnjuRNvMoatQGJkRneTj2CoPSPaQhWo=
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.7 h1:wQ4DdHY++uwxwth2CHL7s+duGqmMLaoIRBOQCa9HPTk=
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.7/go.mod h1:OG09zL/PHPaBJefp4HsPz2YLUJ+zIQHbpgCtLnOx8I4=
|
||||
github.com/lightningnetwork/lnd/ticker v1.1.1 h1:J/b6N2hibFtC7JLV77ULQp++QLtCwT6ijJlbdiZFbSM=
|
||||
github.com/lightningnetwork/lnd/ticker v1.1.1/go.mod h1:waPTRAAcwtu7Ji3+3k+u/xH5GHovTsCoSVpho0KDvdA=
|
||||
github.com/lightningnetwork/lnd/tlv v1.2.6 h1:icvQG2yDr6k3ZuZzfRdG3EJp6pHurcuh3R6dg0gv/Mw=
|
||||
github.com/lightningnetwork/lnd/tlv v1.2.6/go.mod h1:/CmY4VbItpOldksocmGT4lxiJqRP9oLxwSZOda2kzNQ=
|
||||
github.com/lightningnetwork/lnd/tor v1.1.2 h1:3zv9z/EivNFaMF89v3ciBjCS7kvCj4ZFG7XvD2Qq0/k=
|
||||
github.com/lightningnetwork/lnd/tor v1.1.2/go.mod h1:j7T9uJ2NLMaHwE7GiBGnpYLn4f7NRoTM6qj+ul6/ycA=
|
||||
github.com/lightningnetwork/lnd/tlv v1.3.0 h1:exS/KCPEgpOgviIttfiXAPaUqw2rHQrnUOpP7HPBPiY=
|
||||
github.com/lightningnetwork/lnd/tlv v1.3.0/go.mod h1:pJuiBj1ecr1WWLOtcZ+2+hu9Ey25aJWFIsjmAoPPnmc=
|
||||
github.com/lightningnetwork/lnd/tor v1.1.4 h1:TUW27EXqoZCcCAQPlD4aaDfh8jMbBS9CghNz50qqwtA=
|
||||
github.com/lightningnetwork/lnd/tor v1.1.4/go.mod h1:qSRB8llhAK+a6kaTPWOLLXSZc6Hg8ZC0mq1sUQ/8JfI=
|
||||
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=
|
||||
@@ -661,8 +666,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
|
||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec h1:FpfFs4EhNehiVfzQttTuxanPIT43FtkkCFypIod8LHo=
|
||||
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec/go.mod h1:BZ1RAoRPbCxum9Grlv5aeksu2H8BiKehBYooU2LFiOQ=
|
||||
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
|
||||
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
|
||||
go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0=
|
||||
go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I=
|
||||
go.etcd.io/etcd/api/v3 v3.5.7 h1:sbcmosSVesNrWOJ58ZQFitHMdncusIifYcrBfwrlJSY=
|
||||
go.etcd.io/etcd/api/v3 v3.5.7/go.mod h1:9qew1gCdDDLu+VwmeG+iFpL+QlpHTo7iubavdVDgCAA=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.7 h1:y3kf5Gbp4e4q7egZdn5T7W9TSHUvkClN6u+Rq9mEOmg=
|
||||
@@ -1138,6 +1143,8 @@ modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
|
||||
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
|
||||
nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
|
||||
nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
|
||||
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
|
||||
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightninglabs/lightning-node-connect/hashmailrpc"
|
||||
"github.com/lightningnetwork/lnd/tlv"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
@@ -104,8 +105,8 @@ func (r *readStream) ReadNextMsg(ctx context.Context) ([]byte, error) {
|
||||
|
||||
// ReturnStream gives up the read stream by passing it back up through the
|
||||
// payment stream.
|
||||
func (r *readStream) ReturnStream() {
|
||||
log.Debugf("Returning read stream %x", r.parentStream.id[:])
|
||||
func (r *readStream) ReturnStream(ctx context.Context) {
|
||||
log.DebugS(ctx, "Returning read stream")
|
||||
r.parentStream.ReturnReadStream(r)
|
||||
}
|
||||
|
||||
@@ -193,7 +194,7 @@ type stream struct {
|
||||
}
|
||||
|
||||
// newStream creates a new stream independent of any given stream ID.
|
||||
func newStream(id streamID, limiter *rate.Limiter,
|
||||
func newStream(ctx context.Context, id streamID, limiter *rate.Limiter,
|
||||
equivAuth func(auth *hashmailrpc.CipherBoxAuth) error,
|
||||
onStale func() error, staleTimeout time.Duration) *stream {
|
||||
|
||||
@@ -210,7 +211,7 @@ func newStream(id streamID, limiter *rate.Limiter,
|
||||
id: id,
|
||||
equivAuth: equivAuth,
|
||||
limiter: limiter,
|
||||
status: newStreamStatus(onStale, staleTimeout),
|
||||
status: newStreamStatus(ctx, onStale, staleTimeout),
|
||||
readBytesChan: make(chan []byte),
|
||||
readErrChan: make(chan error, 1),
|
||||
quit: make(chan struct{}),
|
||||
@@ -305,8 +306,8 @@ func (s *stream) ReturnWriteStream(w *writeStream) {
|
||||
// RequestReadStream attempts to request the read stream from the main backing
|
||||
// stream. If we're unable to obtain it before the timeout, then an error is
|
||||
// returned.
|
||||
func (s *stream) RequestReadStream() (*readStream, error) {
|
||||
log.Tracef("HashMailStream(%x): requesting read stream", s.id[:])
|
||||
func (s *stream) RequestReadStream(ctx context.Context) (*readStream, error) {
|
||||
log.TraceS(ctx, "Requested read stream")
|
||||
|
||||
select {
|
||||
case r := <-s.readStreamChan:
|
||||
@@ -320,8 +321,8 @@ func (s *stream) RequestReadStream() (*readStream, error) {
|
||||
// RequestWriteStream attempts to request the read stream from the main backing
|
||||
// stream. If we're unable to obtain it before the timeout, then an error is
|
||||
// returned.
|
||||
func (s *stream) RequestWriteStream() (*writeStream, error) {
|
||||
log.Tracef("HashMailStream(%x): requesting write stream", s.id[:])
|
||||
func (s *stream) RequestWriteStream(ctx context.Context) (*writeStream, error) {
|
||||
log.TraceS(ctx, "Requesting write stream")
|
||||
|
||||
select {
|
||||
case w := <-s.writeStreamChan:
|
||||
@@ -389,8 +390,10 @@ func (h *hashMailServer) Stop() {
|
||||
}
|
||||
|
||||
// tearDownStaleStream can be used to tear down a stale mailbox stream.
|
||||
func (h *hashMailServer) tearDownStaleStream(id streamID) error {
|
||||
log.Debugf("Tearing down stale HashMail stream: id=%x", id)
|
||||
func (h *hashMailServer) tearDownStaleStream(ctx context.Context,
|
||||
id streamID) error {
|
||||
|
||||
log.DebugS(ctx, "Tearing down stale HashMail stream")
|
||||
|
||||
h.Lock()
|
||||
defer h.Unlock()
|
||||
@@ -428,7 +431,7 @@ func (h *hashMailServer) ValidateStreamAuth(ctx context.Context,
|
||||
}
|
||||
|
||||
// InitStream attempts to initialize a new stream given a valid descriptor.
|
||||
func (h *hashMailServer) InitStream(
|
||||
func (h *hashMailServer) InitStream(ctx context.Context,
|
||||
init *hashmailrpc.CipherBoxAuth) (*hashmailrpc.CipherInitResp, error) {
|
||||
|
||||
h.Lock()
|
||||
@@ -436,7 +439,7 @@ func (h *hashMailServer) InitStream(
|
||||
|
||||
streamID := newStreamID(init.Desc.StreamId)
|
||||
|
||||
log.Debugf("Creating new HashMail Stream: %x", streamID)
|
||||
log.DebugS(ctx, "Creating new HashMail Stream")
|
||||
|
||||
// The stream is already active, and we only allow a single session for
|
||||
// a given stream to exist.
|
||||
@@ -452,10 +455,11 @@ func (h *hashMailServer) InitStream(
|
||||
rate.Every(h.cfg.msgRate), h.cfg.msgBurstAllowance,
|
||||
)
|
||||
freshStream := newStream(
|
||||
streamID, limiter, func(auth *hashmailrpc.CipherBoxAuth) error {
|
||||
ctx, streamID, limiter,
|
||||
func(auth *hashmailrpc.CipherBoxAuth) error {
|
||||
return nil
|
||||
}, func() error {
|
||||
return h.tearDownStaleStream(streamID)
|
||||
return h.tearDownStaleStream(ctx, streamID)
|
||||
}, h.cfg.staleTimeout,
|
||||
)
|
||||
|
||||
@@ -470,7 +474,9 @@ func (h *hashMailServer) InitStream(
|
||||
|
||||
// LookUpReadStream attempts to loop up a new stream. If the stream is found, then
|
||||
// the stream is marked as being active. Otherwise, an error is returned.
|
||||
func (h *hashMailServer) LookUpReadStream(streamID []byte) (*readStream, error) {
|
||||
func (h *hashMailServer) LookUpReadStream(ctx context.Context,
|
||||
streamID []byte) (*readStream, error) {
|
||||
|
||||
h.RLock()
|
||||
defer h.RUnlock()
|
||||
|
||||
@@ -479,12 +485,13 @@ func (h *hashMailServer) LookUpReadStream(streamID []byte) (*readStream, error)
|
||||
return nil, fmt.Errorf("stream not found")
|
||||
}
|
||||
|
||||
return stream.RequestReadStream()
|
||||
return stream.RequestReadStream(ctx)
|
||||
}
|
||||
|
||||
// LookUpWriteStream attempts to loop up a new stream. If the stream is found,
|
||||
// then the stream is marked as being active. Otherwise, an error is returned.
|
||||
func (h *hashMailServer) LookUpWriteStream(streamID []byte) (*writeStream, error) {
|
||||
func (h *hashMailServer) LookUpWriteStream(ctx context.Context,
|
||||
streamID []byte) (*writeStream, error) {
|
||||
|
||||
h.RLock()
|
||||
defer h.RUnlock()
|
||||
@@ -494,7 +501,7 @@ func (h *hashMailServer) LookUpWriteStream(streamID []byte) (*writeStream, error
|
||||
return nil, fmt.Errorf("stream not found")
|
||||
}
|
||||
|
||||
return stream.RequestWriteStream()
|
||||
return stream.RequestWriteStream(ctx)
|
||||
}
|
||||
|
||||
// TearDownStream attempts to tear down a stream which renders both sides of
|
||||
@@ -523,8 +530,7 @@ func (h *hashMailServer) TearDownStream(ctx context.Context, streamID []byte,
|
||||
return err
|
||||
}
|
||||
|
||||
log.Debugf("Tearing down HashMail stream: id=%x, auth=%v",
|
||||
auth.Desc.StreamId, auth.Auth)
|
||||
log.DebugS(ctx, "Tearing down HashMail stream", "auth", auth.Auth)
|
||||
|
||||
// At this point we know the auth was valid, so we'll tear down the
|
||||
// stream.
|
||||
@@ -568,16 +574,17 @@ func (h *hashMailServer) NewCipherBox(ctx context.Context,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.Debugf("New HashMail stream init: id=%x, auth=%v",
|
||||
init.Desc.StreamId, init.Auth)
|
||||
ctxl := btclog.WithCtx(ctx, btclog.Hex("stream_id", init.Desc.StreamId))
|
||||
|
||||
if err := h.ValidateStreamAuth(ctx, init); err != nil {
|
||||
log.Debugf("Stream creation validation failed (id=%x): %v",
|
||||
init.Desc.StreamId, err)
|
||||
log.DebugS(ctxl, "New HashMail stream init", "auth", init.Auth)
|
||||
|
||||
if err := h.ValidateStreamAuth(ctxl, init); err != nil {
|
||||
log.DebugS(ctxl, "Stream creation validation failed",
|
||||
"err", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp, err := h.InitStream(init)
|
||||
resp, err := h.InitStream(ctxl, init)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -597,8 +604,9 @@ func (h *hashMailServer) DelCipherBox(ctx context.Context,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.Debugf("New HashMail stream deletion: id=%x, auth=%v",
|
||||
auth.Desc.StreamId, auth.Auth)
|
||||
ctxl := btclog.WithCtx(ctx, btclog.Hex("stream_id", auth.Desc.StreamId))
|
||||
|
||||
log.DebugS(ctxl, "New HashMail stream deletion", "auth", auth.Auth)
|
||||
|
||||
if err := h.TearDownStream(ctx, auth.Desc.StreamId, auth); err != nil {
|
||||
return nil, err
|
||||
@@ -610,7 +618,7 @@ func (h *hashMailServer) DelCipherBox(ctx context.Context,
|
||||
// SendStream implements the client streaming call to utilize the write end of
|
||||
// a stream to send a message to the read end.
|
||||
func (h *hashMailServer) SendStream(readStream hashmailrpc.HashMail_SendStreamServer) error {
|
||||
log.Debugf("New HashMail write stream pending...")
|
||||
log.Debug("New HashMail write stream pending...")
|
||||
|
||||
// We'll need to receive the first message in order to determine if
|
||||
// this stream exists or not
|
||||
@@ -621,6 +629,11 @@ func (h *hashMailServer) SendStream(readStream hashmailrpc.HashMail_SendStreamSe
|
||||
return err
|
||||
}
|
||||
|
||||
ctx := btclog.WithCtx(
|
||||
readStream.Context(),
|
||||
btclog.Hex("stream_id", cipherBox.Desc.StreamId),
|
||||
)
|
||||
|
||||
switch {
|
||||
case cipherBox.Desc == nil:
|
||||
return fmt.Errorf("cipher box descriptor required")
|
||||
@@ -629,12 +642,11 @@ func (h *hashMailServer) SendStream(readStream hashmailrpc.HashMail_SendStreamSe
|
||||
return fmt.Errorf("stream_id required")
|
||||
}
|
||||
|
||||
log.Debugf("New HashMail write stream: id=%x",
|
||||
cipherBox.Desc.StreamId)
|
||||
log.DebugS(ctx, "New HashMail write stream")
|
||||
|
||||
// Now that we have the first message, we can attempt to look up the
|
||||
// given stream.
|
||||
writeStream, err := h.LookUpWriteStream(cipherBox.Desc.StreamId)
|
||||
writeStream, err := h.LookUpWriteStream(ctx, cipherBox.Desc.StreamId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -643,13 +655,12 @@ func (h *hashMailServer) SendStream(readStream hashmailrpc.HashMail_SendStreamSe
|
||||
// write inactive if the client hangs up on their end.
|
||||
defer writeStream.ReturnStream()
|
||||
|
||||
log.Tracef("Sending msg_len=%v to stream_id=%x", len(cipherBox.Msg),
|
||||
cipherBox.Desc.StreamId)
|
||||
log.TraceS(ctx, "Sending message to stream",
|
||||
"msg_len", len(cipherBox.Msg))
|
||||
|
||||
// We'll send the first message into the stream, then enter our loop
|
||||
// below to continue to read from the stream and send it to the read
|
||||
// end.
|
||||
ctx := readStream.Context()
|
||||
if err := writeStream.WriteMsg(ctx, cipherBox.Msg); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -659,7 +670,7 @@ func (h *hashMailServer) SendStream(readStream hashmailrpc.HashMail_SendStreamSe
|
||||
// exit before shutting down.
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
log.Debugf("SendStream: Context done, exiting")
|
||||
log.DebugS(ctx, "SendStream: Context done, exiting")
|
||||
return nil
|
||||
case <-h.quit:
|
||||
return fmt.Errorf("server shutting down")
|
||||
@@ -669,13 +680,13 @@ func (h *hashMailServer) SendStream(readStream hashmailrpc.HashMail_SendStreamSe
|
||||
|
||||
cipherBox, err := readStream.Recv()
|
||||
if err != nil {
|
||||
log.Debugf("SendStream: Exiting write stream RPC "+
|
||||
"stream read: %v", err)
|
||||
log.DebugS(ctx, "SendStream: Exiting write stream RPC "+
|
||||
"stream read", err)
|
||||
return err
|
||||
}
|
||||
|
||||
log.Tracef("Sending msg_len=%v to stream_id=%x",
|
||||
len(cipherBox.Msg), cipherBox.Desc.StreamId)
|
||||
log.TraceS(ctx, "Sending message to stream",
|
||||
"msg_len", len(cipherBox.Msg))
|
||||
|
||||
if err := writeStream.WriteMsg(ctx, cipherBox.Msg); err != nil {
|
||||
return err
|
||||
@@ -689,25 +700,30 @@ func (h *hashMailServer) SendStream(readStream hashmailrpc.HashMail_SendStreamSe
|
||||
func (h *hashMailServer) RecvStream(desc *hashmailrpc.CipherBoxDesc,
|
||||
reader hashmailrpc.HashMail_RecvStreamServer) error {
|
||||
|
||||
ctx := btclog.WithCtx(
|
||||
reader.Context(),
|
||||
btclog.Hex("stream_id", desc.StreamId),
|
||||
)
|
||||
|
||||
// First, we'll attempt to locate the stream. We allow any single
|
||||
// entity that knows of the full stream ID to access the read end.
|
||||
readStream, err := h.LookUpReadStream(desc.StreamId)
|
||||
readStream, err := h.LookUpReadStream(ctx, desc.StreamId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Debugf("New HashMail read stream: id=%x", desc.StreamId)
|
||||
log.DebugS(ctx, "New HashMail read stream")
|
||||
|
||||
// If the reader hangs up, then we'll mark the stream as inactive so
|
||||
// another can take its place.
|
||||
defer readStream.ReturnStream()
|
||||
defer readStream.ReturnStream(ctx)
|
||||
|
||||
for {
|
||||
// Check to see if the stream has been closed or if we need to
|
||||
// exit before shutting down.
|
||||
// exit before shutting d[own.
|
||||
select {
|
||||
case <-reader.Context().Done():
|
||||
log.Debugf("Read stream context done.")
|
||||
log.DebugS(ctx, "Read stream context done.")
|
||||
return nil
|
||||
case <-h.quit:
|
||||
return fmt.Errorf("server shutting down")
|
||||
@@ -717,12 +733,11 @@ func (h *hashMailServer) RecvStream(desc *hashmailrpc.CipherBoxDesc,
|
||||
|
||||
nextMsg, err := readStream.ReadNextMsg(reader.Context())
|
||||
if err != nil {
|
||||
log.Debugf("Got error an read stream read: %v", err)
|
||||
log.ErrorS(ctx, "Got error on read stream read", err)
|
||||
return err
|
||||
}
|
||||
|
||||
log.Tracef("Read %v bytes for HashMail stream_id=%x",
|
||||
len(nextMsg), desc.StreamId)
|
||||
log.TraceS(ctx, "Read bytes", "msg_len", len(nextMsg))
|
||||
|
||||
// In order not to duplicate metric data, we only record this
|
||||
// read if its streamID is odd. We use the base stream ID as the
|
||||
@@ -742,8 +757,8 @@ func (h *hashMailServer) RecvStream(desc *hashmailrpc.CipherBoxDesc,
|
||||
Msg: nextMsg,
|
||||
})
|
||||
if err != nil {
|
||||
log.Debugf("Got error when sending on read stream: %v",
|
||||
err)
|
||||
log.DebugS(ctx, "Got error when sending on read stream",
|
||||
"err", err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -767,7 +782,7 @@ type streamStatus struct {
|
||||
}
|
||||
|
||||
// newStreamStatus constructs a new streamStatus instance.
|
||||
func newStreamStatus(onStale func() error,
|
||||
func newStreamStatus(ctx context.Context, onStale func() error,
|
||||
staleTimeout time.Duration) *streamStatus {
|
||||
|
||||
if staleTimeout < 0 {
|
||||
@@ -778,7 +793,7 @@ func newStreamStatus(onStale func() error,
|
||||
|
||||
staleTimer := time.AfterFunc(staleTimeout, func() {
|
||||
if err := onStale(); err != nil {
|
||||
log.Errorf("error in onStale callback: %v", err)
|
||||
log.ErrorS(ctx, "Error from onStale callback", err)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -7,9 +7,11 @@ import (
|
||||
"math"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightninglabs/lightning-node-connect/hashmailrpc"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
"github.com/lightningnetwork/lnd/lntest/wait"
|
||||
@@ -32,9 +34,12 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
logWriter := build.NewRotatingLogWriter()
|
||||
SetupLoggers(logWriter, signal.Interceptor{})
|
||||
_ = build.ParseAndSetDebugLevels("trace,PRXY=warn", logWriter)
|
||||
logMgr := build.NewSubLoggerManager(btclog.NewDefaultHandler(os.Stdout))
|
||||
SetupLoggers(logMgr, signal.Interceptor{})
|
||||
err := build.ParseAndSetDebugLevels("trace,PRXY=warn", logMgr)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHashMailServerReturnStream(t *testing.T) {
|
||||
@@ -307,7 +312,6 @@ func TestStaleMailboxCleanup(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ package test
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
)
|
||||
|
||||
// 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.
|
||||
var (
|
||||
backendLog = btclog.NewBackend(logWriter{})
|
||||
logger = backendLog.Logger("TEST")
|
||||
backendLog = btclog.NewDefaultHandler(logWriter{}).SubSystem("TEST")
|
||||
logger = btclog.NewSLogger(backendLog)
|
||||
)
|
||||
|
||||
// logWriter implements an io.Writer that outputs to both standard output and
|
||||
|
||||
@@ -53,6 +53,14 @@ func (s *mockSigner) SignMessage(ctx context.Context, msg []byte,
|
||||
return s.lnd.Signature, nil
|
||||
}
|
||||
|
||||
func (s *mockSigner) SignOutputRawKeyLocator(ctx context.Context,
|
||||
tx *wire.MsgTx,
|
||||
signDescriptors []*lndclient.SignDescriptor,
|
||||
prevOutputs []*wire.TxOut) ([][]byte, error) {
|
||||
|
||||
return [][]byte{s.lnd.Signature}, nil
|
||||
}
|
||||
|
||||
func (s *mockSigner) VerifyMessage(ctx context.Context, msg, sig []byte,
|
||||
pubkey [33]byte, opts ...lndclient.VerifyMessageOption) (bool, error) {
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ func TestCaveatSerialization(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
success := t.Run(test.name, func(t *testing.T) {
|
||||
caveat, err := DecodeCaveat(test.caveatStr)
|
||||
if !errors.Is(err, test.err) {
|
||||
@@ -185,7 +184,6 @@ func TestVerifyCaveats(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
success := t.Run(test.name, func(t *testing.T) {
|
||||
err := VerifyCaveats(test.caveats, test.satisfiers...)
|
||||
if test.shouldFail && err == nil {
|
||||
|
||||
@@ -282,7 +282,6 @@ func TestUnaryInterceptor(t *testing.T) {
|
||||
|
||||
// Run through the test cases.
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
intercept := func() error {
|
||||
return tc.interceptor.UnaryInterceptor(
|
||||
ctx, "", nil, nil, nil, unaryInvoker, nil,
|
||||
@@ -314,7 +313,6 @@ func TestStreamInterceptor(t *testing.T) {
|
||||
|
||||
// Run through the test cases.
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
intercept := func() error {
|
||||
_, err := tc.interceptor.StreamInterceptor(
|
||||
ctx, nil, nil, "", streamInvoker,
|
||||
|
||||
@@ -44,7 +44,6 @@ func TestIdentifierSerialization(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
success := t.Run(test.name, func(t *testing.T) {
|
||||
var buf bytes.Buffer
|
||||
err := EncodeIdentifier(&buf, &test.id)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package l402
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
)
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ func TestTimeoutSatisfier(t *testing.T) {
|
||||
)
|
||||
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
var prev *Caveat
|
||||
for _, timeout := range test.timeouts {
|
||||
|
||||
@@ -58,7 +58,6 @@ func TestServicesCaveatSerialization(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
success := t.Run(test.name, func(t *testing.T) {
|
||||
services, err := decodeServicesCaveatValue(test.value)
|
||||
if !errors.Is(err, test.err) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package lnc
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
)
|
||||
|
||||
|
||||
7
log.go
7
log.go
@@ -1,7 +1,7 @@
|
||||
package aperture
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightninglabs/aperture/auth"
|
||||
"github.com/lightninglabs/aperture/challenger"
|
||||
"github.com/lightninglabs/aperture/l402"
|
||||
@@ -20,10 +20,9 @@ var (
|
||||
)
|
||||
|
||||
// SetupLoggers initializes all package-global logger variables.
|
||||
func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor) {
|
||||
func SetupLoggers(root *build.SubLoggerManager, intercept signal.Interceptor) {
|
||||
genLogger := genSubLogger(root, intercept)
|
||||
|
||||
logWriter = root
|
||||
log = build.NewSubLogger(Subsystem, genLogger)
|
||||
|
||||
lnd.SetSubLogger(root, Subsystem, log)
|
||||
@@ -38,7 +37,7 @@ func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor) {
|
||||
|
||||
// genSubLogger creates a logger for a subsystem. We provide an instance of
|
||||
// a signal.Interceptor to be able to shutdown in the case of a critical error.
|
||||
func genSubLogger(root *build.RotatingLogWriter,
|
||||
func genSubLogger(root *build.SubLoggerManager,
|
||||
interceptor signal.Interceptor) func(string) btclog.Logger {
|
||||
|
||||
// Create a shutdown function which will request shutdown from our
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
)
|
||||
|
||||
|
||||
@@ -101,8 +101,6 @@ func TestProxyHTTP(t *testing.T) {
|
||||
}}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
|
||||
t.Run(tc.name+" GET", func(t *testing.T) {
|
||||
runHTTPTest(t, tc, "GET")
|
||||
})
|
||||
@@ -236,8 +234,6 @@ func TestProxyGRPC(t *testing.T) {
|
||||
}}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
runGRPCTest(t, tc)
|
||||
})
|
||||
|
||||
@@ -215,3 +215,14 @@ hashmail:
|
||||
prometheus:
|
||||
enabled: true
|
||||
listenaddr: "localhost:9000"
|
||||
|
||||
# Console and file logger settings.
|
||||
logging:
|
||||
console:
|
||||
style: true
|
||||
disable: false
|
||||
callsite: off
|
||||
notimestamps: true
|
||||
file:
|
||||
disable: false
|
||||
callsite: long
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.22.6-bookworm
|
||||
FROM golang:1.23.6-bookworm
|
||||
|
||||
RUN apt-get update && apt-get install -y git
|
||||
ENV GOCACHE=/tmp/build/.cache
|
||||
|
||||
239
tools/go.mod
239
tools/go.mod
@@ -1,200 +1,201 @@
|
||||
module github.com/lightninglabs/aperture/tools
|
||||
|
||||
go 1.22
|
||||
|
||||
toolchain go1.22.6
|
||||
go 1.23.6
|
||||
|
||||
require (
|
||||
github.com/golangci/golangci-lint v1.55.2
|
||||
github.com/ory/go-acc v0.2.6
|
||||
github.com/golangci/golangci-lint v1.64.5
|
||||
github.com/ory/go-acc v0.2.8
|
||||
github.com/rinchsan/gosimports v0.1.5
|
||||
)
|
||||
|
||||
require (
|
||||
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
|
||||
4d63.com/gochecknoglobals v0.2.1 // indirect
|
||||
github.com/4meepo/tagalign v1.3.3 // indirect
|
||||
github.com/Abirdcfly/dupword v0.0.13 // indirect
|
||||
github.com/Antonboom/errname v0.1.12 // indirect
|
||||
github.com/Antonboom/nilnil v0.1.7 // indirect
|
||||
github.com/Antonboom/testifylint v0.2.3 // indirect
|
||||
github.com/BurntSushi/toml v1.3.2 // indirect
|
||||
4d63.com/gochecknoglobals v0.2.2 // indirect
|
||||
github.com/4meepo/tagalign v1.4.1 // indirect
|
||||
github.com/Abirdcfly/dupword v0.1.3 // indirect
|
||||
github.com/Antonboom/errname v1.0.0 // indirect
|
||||
github.com/Antonboom/nilnil v1.0.1 // indirect
|
||||
github.com/Antonboom/testifylint v1.5.2 // indirect
|
||||
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
|
||||
github.com/Crocmagnon/fatcontext v0.7.1 // indirect
|
||||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
|
||||
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect
|
||||
github.com/alecthomas/go-check-sumtype v0.1.3 // indirect
|
||||
github.com/alexkohler/nakedret/v2 v2.0.2 // indirect
|
||||
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.3.0 // indirect
|
||||
github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect
|
||||
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
|
||||
github.com/alexkohler/nakedret/v2 v2.0.5 // indirect
|
||||
github.com/alexkohler/prealloc v1.0.0 // indirect
|
||||
github.com/alingse/asasalint v0.0.11 // indirect
|
||||
github.com/alingse/nilnesserr v0.1.2 // indirect
|
||||
github.com/ashanbrown/forbidigo v1.6.0 // indirect
|
||||
github.com/ashanbrown/makezero v1.1.1 // indirect
|
||||
github.com/ashanbrown/makezero v1.2.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bkielbasa/cyclop v1.2.1 // indirect
|
||||
github.com/bkielbasa/cyclop v1.2.3 // indirect
|
||||
github.com/blizzy78/varnamelen v0.8.0 // indirect
|
||||
github.com/bombsimon/wsl/v3 v3.4.0 // indirect
|
||||
github.com/breml/bidichk v0.2.7 // indirect
|
||||
github.com/breml/errchkjson v0.3.6 // indirect
|
||||
github.com/butuzov/ireturn v0.2.2 // indirect
|
||||
github.com/butuzov/mirror v1.1.0 // indirect
|
||||
github.com/catenacyber/perfsprint v0.2.0 // indirect
|
||||
github.com/ccojocar/zxcvbn-go v1.0.1 // indirect
|
||||
github.com/bombsimon/wsl/v4 v4.5.0 // indirect
|
||||
github.com/breml/bidichk v0.3.2 // indirect
|
||||
github.com/breml/errchkjson v0.4.0 // indirect
|
||||
github.com/butuzov/ireturn v0.3.1 // indirect
|
||||
github.com/butuzov/mirror v1.3.0 // indirect
|
||||
github.com/catenacyber/perfsprint v0.8.1 // indirect
|
||||
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
|
||||
github.com/cespare/xxhash v1.1.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/charithe/durationcheck v0.0.10 // indirect
|
||||
github.com/chavacava/garif v0.1.0 // indirect
|
||||
github.com/curioswitch/go-reassign v0.2.0 // indirect
|
||||
github.com/daixiang0/gci v0.11.2 // indirect
|
||||
github.com/ckaznocha/intrange v0.3.0 // indirect
|
||||
github.com/curioswitch/go-reassign v0.3.0 // indirect
|
||||
github.com/daixiang0/gci v0.13.5 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/denis-tingaikin/go-header v0.4.3 // indirect
|
||||
github.com/denis-tingaikin/go-header v0.5.0 // indirect
|
||||
github.com/dgraph-io/ristretto v0.0.2 // indirect
|
||||
github.com/esimonov/ifshort v1.0.4 // indirect
|
||||
github.com/ettle/strcase v0.1.1 // indirect
|
||||
github.com/fatih/color v1.15.0 // indirect
|
||||
github.com/ettle/strcase v0.2.0 // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/fatih/structtag v1.2.0 // indirect
|
||||
github.com/firefart/nonamedreturns v1.0.4 // indirect
|
||||
github.com/firefart/nonamedreturns v1.0.5 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/fzipp/gocyclo v0.6.0 // indirect
|
||||
github.com/ghostiam/protogetter v0.2.3 // indirect
|
||||
github.com/go-critic/go-critic v0.9.0 // indirect
|
||||
github.com/ghostiam/protogetter v0.3.9 // indirect
|
||||
github.com/go-critic/go-critic v0.12.0 // indirect
|
||||
github.com/go-toolsmith/astcast v1.1.0 // indirect
|
||||
github.com/go-toolsmith/astcopy v1.1.0 // indirect
|
||||
github.com/go-toolsmith/astequal v1.1.0 // indirect
|
||||
github.com/go-toolsmith/astequal v1.2.0 // indirect
|
||||
github.com/go-toolsmith/astfmt v1.1.0 // indirect
|
||||
github.com/go-toolsmith/astp v1.1.0 // indirect
|
||||
github.com/go-toolsmith/strparse v1.1.0 // indirect
|
||||
github.com/go-toolsmith/typep v1.1.0 // indirect
|
||||
github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
|
||||
github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/gofrs/flock v0.8.1 // indirect
|
||||
github.com/gofrs/flock v0.12.1 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
|
||||
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
|
||||
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
|
||||
github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect
|
||||
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect
|
||||
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
|
||||
github.com/golangci/misspell v0.4.1 // indirect
|
||||
github.com/golangci/revgrep v0.5.2 // indirect
|
||||
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
|
||||
github.com/golangci/go-printf-func-name v0.1.0 // indirect
|
||||
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
|
||||
github.com/golangci/misspell v0.6.0 // indirect
|
||||
github.com/golangci/plugin-module-register v0.1.1 // indirect
|
||||
github.com/golangci/revgrep v0.8.0 // indirect
|
||||
github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/google/uuid v1.3.1 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.1.0 // indirect
|
||||
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
|
||||
github.com/gostaticanalysis/comment v1.4.2 // indirect
|
||||
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
|
||||
github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect
|
||||
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
|
||||
github.com/hashicorp/go-version v1.7.0 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hexops/gotextdiff v1.0.3 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/jgautheron/goconst v1.6.0 // indirect
|
||||
github.com/jgautheron/goconst v1.7.1 // indirect
|
||||
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
|
||||
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
|
||||
github.com/julz/importas v0.1.0 // indirect
|
||||
github.com/kisielk/errcheck v1.6.3 // indirect
|
||||
github.com/kisielk/gotool v1.0.0 // indirect
|
||||
github.com/kkHAIKE/contextcheck v1.1.4 // indirect
|
||||
github.com/jjti/go-spancheck v0.6.4 // indirect
|
||||
github.com/julz/importas v0.2.0 // indirect
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.1 // indirect
|
||||
github.com/kisielk/errcheck v1.8.0 // indirect
|
||||
github.com/kkHAIKE/contextcheck v1.1.5 // indirect
|
||||
github.com/kulti/thelper v0.6.3 // indirect
|
||||
github.com/kunwardeep/paralleltest v1.0.8 // indirect
|
||||
github.com/kyoh86/exportloopref v0.1.11 // indirect
|
||||
github.com/ldez/gomoddirectives v0.2.3 // indirect
|
||||
github.com/ldez/tagliatelle v0.5.0 // indirect
|
||||
github.com/leonklingele/grouper v1.1.1 // indirect
|
||||
github.com/lufeee/execinquery v1.2.1 // indirect
|
||||
github.com/macabu/inamedparam v0.1.2 // indirect
|
||||
github.com/kunwardeep/paralleltest v1.0.10 // indirect
|
||||
github.com/lasiar/canonicalheader v1.1.2 // indirect
|
||||
github.com/ldez/exptostd v0.4.1 // indirect
|
||||
github.com/ldez/gomoddirectives v0.6.1 // indirect
|
||||
github.com/ldez/grignotin v0.9.0 // indirect
|
||||
github.com/ldez/tagliatelle v0.7.1 // indirect
|
||||
github.com/ldez/usetesting v0.4.2 // indirect
|
||||
github.com/leonklingele/grouper v1.1.2 // indirect
|
||||
github.com/macabu/inamedparam v0.1.3 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/maratori/testableexamples v1.0.0 // indirect
|
||||
github.com/maratori/testpackage v1.1.1 // indirect
|
||||
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/matoous/godox v1.1.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
|
||||
github.com/mgechev/revive v1.3.4 // indirect
|
||||
github.com/mgechev/revive v1.6.1 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/moricho/tparallel v0.3.1 // indirect
|
||||
github.com/moricho/tparallel v0.3.2 // indirect
|
||||
github.com/nakabonne/nestif v0.3.1 // indirect
|
||||
github.com/nishanths/exhaustive v0.11.0 // indirect
|
||||
github.com/nishanths/exhaustive v0.12.0 // indirect
|
||||
github.com/nishanths/predeclared v0.2.2 // indirect
|
||||
github.com/nunnatsa/ginkgolinter v0.14.1 // indirect
|
||||
github.com/nunnatsa/ginkgolinter v0.19.0 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/ory/viper v1.7.5 // indirect
|
||||
github.com/pborman/uuid v1.2.0 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/polyfloyd/go-errorlint v1.4.5 // indirect
|
||||
github.com/polyfloyd/go-errorlint v1.7.1 // indirect
|
||||
github.com/prometheus/client_golang v1.12.1 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/quasilyte/go-ruleguard v0.4.0 // indirect
|
||||
github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
|
||||
github.com/quasilyte/gogrep v0.5.0 // indirect
|
||||
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
|
||||
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
|
||||
github.com/ryancurrah/gomodguard v1.3.0 // indirect
|
||||
github.com/raeperd/recvcheck v0.2.0 // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/rogpeppe/go-internal v1.13.1 // indirect
|
||||
github.com/ryancurrah/gomodguard v1.3.5 // indirect
|
||||
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
|
||||
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
|
||||
github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect
|
||||
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect
|
||||
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
|
||||
github.com/sashamelentyev/usestdlibvars v1.24.0 // indirect
|
||||
github.com/securego/gosec/v2 v2.18.2 // indirect
|
||||
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
|
||||
github.com/sashamelentyev/usestdlibvars v1.28.0 // indirect
|
||||
github.com/securego/gosec/v2 v2.22.1 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
github.com/sivchari/containedctx v1.0.3 // indirect
|
||||
github.com/sivchari/nosnakecase v1.7.0 // indirect
|
||||
github.com/sivchari/tenv v1.7.1 // indirect
|
||||
github.com/sonatard/noctx v0.0.2 // indirect
|
||||
github.com/sivchari/tenv v1.12.1 // indirect
|
||||
github.com/sonatard/noctx v0.1.0 // indirect
|
||||
github.com/sourcegraph/go-diff v0.7.0 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/afero v1.12.0 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/cobra v1.7.0 // indirect
|
||||
github.com/spf13/cobra v1.8.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/pflag v1.0.6 // indirect
|
||||
github.com/spf13/viper v1.12.0 // indirect
|
||||
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
|
||||
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
|
||||
github.com/stretchr/objx v0.5.0 // indirect
|
||||
github.com/stretchr/testify v1.8.4 // indirect
|
||||
github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/stretchr/testify v1.10.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.1 // indirect
|
||||
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
|
||||
github.com/tdakkota/asciicheck v0.2.0 // indirect
|
||||
github.com/tetafro/godot v1.4.15 // indirect
|
||||
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect
|
||||
github.com/timonwong/loggercheck v0.9.4 // indirect
|
||||
github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect
|
||||
github.com/tdakkota/asciicheck v0.4.0 // indirect
|
||||
github.com/tetafro/godot v1.4.20 // indirect
|
||||
github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3 // indirect
|
||||
github.com/timonwong/loggercheck v0.10.1 // indirect
|
||||
github.com/tomarrell/wrapcheck/v2 v2.10.0 // indirect
|
||||
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
|
||||
github.com/ultraware/funlen v0.1.0 // indirect
|
||||
github.com/ultraware/whitespace v0.0.5 // indirect
|
||||
github.com/uudashr/gocognit v1.1.2 // indirect
|
||||
github.com/ultraware/funlen v0.2.0 // indirect
|
||||
github.com/ultraware/whitespace v0.2.0 // indirect
|
||||
github.com/uudashr/gocognit v1.2.0 // indirect
|
||||
github.com/uudashr/iface v1.3.1 // indirect
|
||||
github.com/xen0n/gosmopolitan v1.2.2 // indirect
|
||||
github.com/yagipy/maintidx v1.0.0 // indirect
|
||||
github.com/yeya24/promlinter v0.2.0 // indirect
|
||||
github.com/ykadowak/zerologlint v0.1.3 // indirect
|
||||
gitlab.com/bosi/decorder v0.4.1 // indirect
|
||||
go-simpler.org/sloglint v0.1.2 // indirect
|
||||
go.tmz.dev/musttag v0.7.2 // indirect
|
||||
github.com/yeya24/promlinter v0.3.0 // indirect
|
||||
github.com/ykadowak/zerologlint v0.1.5 // indirect
|
||||
gitlab.com/bosi/decorder v0.4.2 // indirect
|
||||
go-simpler.org/musttag v0.13.0 // indirect
|
||||
go-simpler.org/sloglint v0.9.0 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/automaxprocs v1.6.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.24.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect
|
||||
golang.org/x/mod v0.13.0 // indirect
|
||||
golang.org/x/sync v0.4.0 // indirect
|
||||
golang.org/x/sys v0.13.0 // indirect
|
||||
golang.org/x/text v0.13.0 // indirect
|
||||
golang.org/x/tools v0.14.0 // indirect
|
||||
google.golang.org/protobuf v1.33.0 // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect
|
||||
golang.org/x/mod v0.23.0 // indirect
|
||||
golang.org/x/sync v0.11.0 // indirect
|
||||
golang.org/x/sys v0.30.0 // indirect
|
||||
golang.org/x/text v0.22.0 // indirect
|
||||
golang.org/x/tools v0.30.0 // indirect
|
||||
google.golang.org/protobuf v1.36.4 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
honnef.co/go/tools v0.4.6 // indirect
|
||||
mvdan.cc/gofumpt v0.5.0 // indirect
|
||||
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
|
||||
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
|
||||
mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect
|
||||
honnef.co/go/tools v0.6.0 // indirect
|
||||
mvdan.cc/gofumpt v0.7.0 // indirect
|
||||
mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect
|
||||
)
|
||||
|
||||
628
tools/go.sum
628
tools/go.sum
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user