Skip to content

Commit

Permalink
introduce raw data export feature
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Bruyelle <thomasbruyelle@hey.com>
  • Loading branch information
DeshErBojhaa and tbruyelle authored Apr 29, 2022
1 parent 9e0cb46 commit 2a8bed1
Show file tree
Hide file tree
Showing 13 changed files with 1,364 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17-alpine3.14 as builder
FROM golang:1.18-alpine3.14 as builder

ARG GIT_TOKEN
ARG SDK_TARGET
Expand All @@ -22,7 +22,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \

FROM alpine:latest

RUN apk --no-cache add ca-certificates mailcap && addgroup -S app && adduser -S app -G app
RUN apk --no-cache add ca-certificates mailcap tar && addgroup -S app && adduser -S app -G app

COPY --from=builder /app/build/tracelistener /usr/local/bin/tracelistener
USER app
Expand Down
2 changes: 1 addition & 1 deletion cmd/resetchain/resetter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"testing"

"github.com/emerishq/emeris-utils/database"
"github.com/cockroachdb/cockroach-go/v2/testserver"
"github.com/emerishq/emeris-utils/database"
"github.com/stretchr/testify/require"
"go.uber.org/zap"
)
Expand Down
9 changes: 8 additions & 1 deletion cmd/tracelistener/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"go.uber.org/zap"

"github.com/emerishq/emeris-utils/logging"
"github.com/emerishq/tracelistener/exporter"
"github.com/emerishq/tracelistener/tracelistener"
"github.com/emerishq/tracelistener/tracelistener/blocktime"
"github.com/emerishq/tracelistener/tracelistener/bulk"
Expand Down Expand Up @@ -116,7 +117,13 @@ func main() {
logger.Fatal(err)
}

go watcher.Watch()
traceExporter, err := exporter.New(exporter.WithLogger(logger))
if err != nil {
logger.Fatal(err)
}
go traceExporter.ListenAndServeHTTP(cfg.ExporterHTTPPort)

go watcher.Watch(traceExporter)

for {
select {
Expand Down
Loading

0 comments on commit 2a8bed1

Please sign in to comment.