diff --git a/Makefile b/Makefile index 118a026..3cb6b73 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GO=go -PROGRAM=build/eosio-ship-trace-reader +PROGRAM=build/thalos-server .PHONY: $(PROGRAM) test diff --git a/app/ship_processor.go b/app/ship_processor.go index 8be8926..aa5f3c8 100644 --- a/app/ship_processor.go +++ b/app/ship_processor.go @@ -4,11 +4,12 @@ import ( "encoding/hex" "encoding/json" + "thalos/abi" + "thalos/transport" + "thalos/transport/message" + log "github.com/sirupsen/logrus" - "eosio-ship-trace-reader/abi" - "eosio-ship-trace-reader/transport" - "eosio-ship-trace-reader/transport/message" "github.com/eoscanada/eos-go/ship" shipclient "github.com/eosswedenorg-go/antelope-ship-client" ) diff --git a/cmd/main/main.go b/cmd/main/main.go index 90aad75..c216820 100644 --- a/cmd/main/main.go +++ b/cmd/main/main.go @@ -11,11 +11,11 @@ import ( "github.com/go-redis/redis/v8" log "github.com/sirupsen/logrus" - "eosio-ship-trace-reader/abi" - "eosio-ship-trace-reader/app" - "eosio-ship-trace-reader/config" - "eosio-ship-trace-reader/transport/redis_common" - "eosio-ship-trace-reader/transport/redis_pubsub" + "thalos/abi" + "thalos/app" + "thalos/config" + "thalos/transport/redis_common" + "thalos/transport/redis_pubsub" "github.com/nikoksr/notify" "github.com/nikoksr/notify/service/telegram" diff --git a/go.mod b/go.mod index 82d6bd6..104ed08 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module eosio-ship-trace-reader +module thalos go 1.18 diff --git a/install.sh b/install.sh index 54d8f04..690b58c 100755 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ INSTALL_DIR=$1 echo "Installing application in: $INSTALL_DIR" mkdir -p "$INSTALL_DIR"/{bin,logs} -install -m 750 -t "${INSTALL_DIR}/bin" build/eosio-ship-trace-reader +install -m 750 -t "${INSTALL_DIR}/bin" build/thalos-server if [ ! -f "${INSTALL_DIR}/config.json" ]; then install -T -m 600 config.example.json "${INSTALL_DIR}/config.json" diff --git a/scripts/start.sh b/scripts/start.sh index ed8ccd3..5049ed7 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,5 +1,5 @@ #!/bin/bash -BIN=bin/eosio-ship-trace-reader +BIN=bin/thalos-server DIR=$(dirname $(realpath $0)) cd "$DIR" @@ -7,6 +7,6 @@ cd "$DIR" date ./stop.sh timestamp=`date +%s` -$BIN -p ./eosio-ship-trace-reader.pid 2> logs/$timestamp.log & +$BIN -p ./thalos.pid 2> logs/$timestamp.log & rm -f out.log ln -s logs/$timestamp.log out.log diff --git a/scripts/stop.sh b/scripts/stop.sh index a916126..d2a59d8 100644 --- a/scripts/stop.sh +++ b/scripts/stop.sh @@ -1,6 +1,6 @@ #!/bin/bash -PIDFILE="$(pwd)/eosio-ship-trace-reader.pid" +PIDFILE="$(pwd)/thalos.pid" if [ -f "$PIDFILE" ]; then pid=$(cat "$PIDFILE") diff --git a/transport/redis_common/key.go b/transport/redis_common/key.go index 0a27e94..e801871 100644 --- a/transport/redis_common/key.go +++ b/transport/redis_common/key.go @@ -3,7 +3,7 @@ package redis_common import ( "fmt" - "eosio-ship-trace-reader/transport" + "thalos/transport" ) // Key consists of a namespace and a channel. diff --git a/transport/redis_common/key_test.go b/transport/redis_common/key_test.go index dba49cc..8529246 100644 --- a/transport/redis_common/key_test.go +++ b/transport/redis_common/key_test.go @@ -3,7 +3,7 @@ package redis_common import ( "testing" - "eosio-ship-trace-reader/transport" + "thalos/transport" ) func TestKey_String(t *testing.T) { diff --git a/transport/redis_common/namespace.go b/transport/redis_common/namespace.go index e51e076..22d9803 100644 --- a/transport/redis_common/namespace.go +++ b/transport/redis_common/namespace.go @@ -3,7 +3,7 @@ package redis_common import ( "strings" - "eosio-ship-trace-reader/transport" + "thalos/transport" ) const ( diff --git a/transport/redis_pubsub/publisher.go b/transport/redis_pubsub/publisher.go index 1625ab8..b4e0864 100644 --- a/transport/redis_pubsub/publisher.go +++ b/transport/redis_pubsub/publisher.go @@ -3,8 +3,8 @@ package redis_pubsub import ( "context" - "eosio-ship-trace-reader/transport" - . "eosio-ship-trace-reader/transport/redis_common" + "thalos/transport" + . "thalos/transport/redis_common" "github.com/go-redis/redis/v8" ) diff --git a/transport/redis_pubsub/publisher_test.go b/transport/redis_pubsub/publisher_test.go index e9a2b83..d88f434 100644 --- a/transport/redis_pubsub/publisher_test.go +++ b/transport/redis_pubsub/publisher_test.go @@ -3,8 +3,8 @@ package redis_pubsub import ( "testing" - "eosio-ship-trace-reader/transport" - . "eosio-ship-trace-reader/transport/redis_common" + "thalos/transport" + . "thalos/transport/redis_common" "github.com/go-redis/redismock/v8" "github.com/stretchr/testify/assert" diff --git a/transport/redis_pubsub/subscriber.go b/transport/redis_pubsub/subscriber.go index 83e27b1..4a14b88 100644 --- a/transport/redis_pubsub/subscriber.go +++ b/transport/redis_pubsub/subscriber.go @@ -5,8 +5,8 @@ import ( "sync" "time" - "eosio-ship-trace-reader/transport" - . "eosio-ship-trace-reader/transport/redis_common" + "thalos/transport" + . "thalos/transport/redis_common" "github.com/go-redis/redis/v8" ) diff --git a/transport/redis_pubsub/subscriber_test.go b/transport/redis_pubsub/subscriber_test.go index 7ce2b70..4b6b72f 100644 --- a/transport/redis_pubsub/subscriber_test.go +++ b/transport/redis_pubsub/subscriber_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "eosio-ship-trace-reader/transport" - . "eosio-ship-trace-reader/transport/redis_common" + "thalos/transport" + . "thalos/transport/redis_common" "github.com/alicebob/miniredis/v2" "github.com/go-redis/redis/v8"