Skip to content

Instantly share code, notes, and snippets.

View sanderpick's full-sized avatar
🎟️
Got me a ticket to ride

Sander Pick sanderpick

🎟️
Got me a ticket to ride
View GitHub Profile
{
"API": {
"HTTPHeaders": {}
},
"Addresses": {
"API": "/ip4/0.0.0.0/tcp/5001",
"Announce": [
"/ip4/40.76.153.74/tcp/4001",
"/ip4/10.240.0.27/tcp/4001"
],
t.Run("WithWriteValidatorAndToken", func(t *testing.T) {
t.Parallel()
db, clean := createTestDB(t)
defer clean()
sks := "CAESQBDFk9kSKooTZrbjTYXSGQkaW0U/kCudBFaLHzm8wOxzRR3Y3rFv7qQ9E0Zhgi4vP+k0vPg7NIbDo/+Cc3snNS0="
skb, err := base64.StdEncoding.DecodeString(sks)
checkErr(t, err)
sk, err := crypto.UnmarshalPrivateKey(skb)
checkErr(t, err)
textile_1 | panic: close of closed channel
textile_1 |
textile_1 | goroutine 44421195 [running]:
textile_1 | github.com/textileio/go-threads/db.(*listener).Close(0xc01e6ac990)
textile_1 | /go/pkg/mod/github.com/textileio/go-threads@v0.1.22-0.20200709194234-b75bad2b9536/db/listeners.go:145 +0x56
textile_1 | github.com/textileio/go-threads/api.(*Service).Listen(0xc015b56dd0, 0xc026fa0960, 0x200e220, 0xc01ad7d820, 0x0, 0x0)
textile_1 | /go/pkg/mod/github.com/textileio/go-threads@v0.1.22-0.20200709194234-b75bad2b9536/api/service.go:729 +0xa04
textile_1 | github.com/textileio/go-threads/api/pb._API_Listen_Handler(0x1854b80, 0xc015b56dd0, 0x2009780, 0xc01c43f820, 0x0, 0x0)
textile_1 | /go/pkg/mod/github.com/textileio/go-threads@v0.1.22-0.20200709194234-b75bad2b9536/api/pb/threads.pb.go:3250 +0x109
textile_1 | github.com/grpc-ecosystem/go-grpc-middleware/auth.StreamServerInterceptor.func1(0x1854b80, 0xc015b56dd0, 0x200a740, 0xc01068ab40, 0xc01c43ef80, 0x1d2a3a0, 0xc01c43efa0, 0xc01c43ef80)
package main
import (
"encoding/json"
"fmt"
"log"
"reflect"
dynamicstruct "github.com/Ompluscator/dynamic-struct"
"github.com/alecthomas/jsonschema"
{
"badger_blocked_puts_total": 0,
"badger_disk_reads_total": 0,
"badger_disk_writes_total": 0,
"badger_gets_total": 0,
"badger_lsm_bloom_hits_total": {},
"badger_lsm_level_gets_total": {},
"badger_lsm_size_bytes": {},
"badger_memtable_gets_total": 0,
"badger_pending_writes_total": {},
12:45:37.953 DEBUG cmds/http: incoming API request: /swarm/connect?arg=%2Fip4%2F128.199.219.111%2Ftcp%2F4001%2Fipfs%2FQmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu&encoding=json&stream-channels=true handler.go:89
12:45:37.954 DEBUG basichost: host <peer.ID Qm*vT3ZJt> dialing <peer.ID Qm*wMKPnu> basic_host.go:442
12:45:37.954 DEBUG swarm2: [<peer.ID Qm*vT3ZJt>] swarm dialing peer [<peer.ID Qm*wMKPnu>] swarm_dial.go:184
12:45:37.954 DEBUG addrutil: InterfaceAddresses: from manet: [/ip4/127.0.0.1 /ip6/::1 /ip6/fe80::1 /ip6/fe80::107e:cbc7:c3cd:659c /ip4/192.168.0.5 /ip6/fe80::982d:11ff:febc:a837 /ip6/fe80::d052:6c87:8f2e:af8d /ip6/fe80::8bdc:3474:20f0:1b57 /ip6/fe80::48f1:b339:c49:5ade /ip4/192.168.56.1 /ip6/fe80::1050:e2c0:174d:3af /ip4/169.254.187.35] addr.go:121
12:45:37.954 DEBUG addrutil: InterfaceAddresses: usable: [/ip4/127.0.0.1 /ip6/::1 /ip4/192.168.0.5 /ip4/192.168.56.1 /ip4/169.254.187.35] addr.go:133
12:45:37.954 DEBUG addrutil: adding resolved addr: /ip4/0.0.0.0/tcp/4001 /ip4/127.0.0.1
@sanderpick
sanderpick / cafe_reinstall.sh
Created December 29, 2018 18:34
Re-installs a Textile cafe node on Linux
#!/usr/bin/env bash
set -e
while getopts r: option
do
case "${option}"
in
r) RELEASE=${OPTARG};;
esac
@sanderpick
sanderpick / cafe_upgrade.sh
Last active January 4, 2019 03:14
Upgrades a Textile cafe node on a remote Linux host
#!/usr/bin/env bash
set -e
while getopts k:r:p: option
do
case "${option}"
in
k) KEY=${OPTARG};;
r) RELEASE=${OPTARG};;
@sanderpick
sanderpick / cafe_install.sh
Last active August 13, 2019 09:02
Installs a Textile cafe node on Linux
#!/usr/bin/env bash
set -e
while getopts r:u:p: option
do
case "${option}"
in
r) RELEASE=${OPTARG};;
u) URL=${OPTARG};;
@sanderpick
sanderpick / cafe_init.sh
Last active January 4, 2019 03:13
Deploys a Textile cafe node to a remote Linux host
#!/usr/bin/env bash
set -e
while getopts k:r:u:p: option
do
case "${option}"
in
k) KEY=${OPTARG};;
r) RELEASE=${OPTARG};;