Skip to content

Commit

Permalink
mvp parquet (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
mosajjal authored Nov 6, 2023
1 parent 63fdcaf commit f61c5c6
Show file tree
Hide file tree
Showing 7 changed files with 487 additions and 85 deletions.
5 changes: 3 additions & 2 deletions cmd/dnsmonster/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func handleInterrupt(ctx context.Context) {
log.Infof("SIGINT Received. Stopping capture...")
go util.GlobalCancel()
go ctx.Done()
<-time.After(2 * time.Second)
<-time.After(4 * time.Second)
log.Fatal("emergency exit")
os.Exit(1)
}()
Expand Down Expand Up @@ -106,9 +106,10 @@ func main() {

// block until capture and output finish their loop, in order to exit cleanly
g.Wait()
// <-time.After(2 * time.Second)
<-time.After(4 * time.Second)
// print metrics for one last time before exiting the program
metricsJSON, _ := json.Marshal(metrics.DefaultRegistry.GetAll())
os.Stderr.WriteString(fmt.Sprintf("metrics: %s\n", metricsJSON))
}

// vim: foldmethod=marker
90 changes: 64 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,61 @@ module github.com/mosajjal/dnsmonster
go 1.20

require (
github.com/ClickHouse/clickhouse-go/v2 v2.10.1
github.com/ClickHouse/clickhouse-go/v2 v2.14.2
github.com/arthurkiller/rollingwriter v1.1.3
github.com/deathowl/go-metrics-prometheus v0.0.0-20221009205350-f2a1482ba35b
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/gopacket/gopacket v1.1.0
github.com/gopacket/gopacket v1.1.1
github.com/hashicorp/go-syslog v1.0.0
github.com/influxdata/influxdb-client-go/v2 v2.12.3
github.com/jackc/pgx/v4 v4.18.1
github.com/prometheus/client_golang v1.16.0
github.com/parquet-go/parquet-go v0.18.0
github.com/prometheus/client_golang v1.17.0
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
github.com/syntaqx/go-metrics-datadog v0.1.1
golang.org/x/sync v0.3.0
golang.org/x/sync v0.4.0
)

require (
github.com/ClickHouse/ch-go v0.57.0 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/ClickHouse/ch-go v0.58.2 // indirect
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
github.com/CloudyKit/jet/v6 v6.2.0 // indirect
github.com/DataDog/datadog-go v4.8.3+incompatible // indirect
github.com/Joker/jade v1.1.3 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/deepmap/oapi-codegen v1.13.0 // indirect
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/deepmap/oapi-codegen v1.15.0 // indirect
github.com/farsightsec/golang-framestream v0.3.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/fgprof v0.9.3 // indirect
github.com/flosch/pongo2/v4 v4.0.2 // indirect
github.com/fortytw2/leaktest v1.3.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.9.1 // indirect
github.com/go-faster/city v1.0.1 // indirect
github.com/go-faster/errors v0.6.1 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.1 // indirect
github.com/go-playground/validator/v10 v10.15.5 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/gomarkdown/markdown v0.0.0-20230922112808-5421fefb8386 // indirect
github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf // indirect
github.com/iris-contrib/schema v0.0.6 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.0 // indirect
github.com/jackc/pgconn v1.14.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
Expand All @@ -51,52 +66,75 @@ require (
github.com/jackc/puddle v1.3.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kataras/blocks v0.0.8 // indirect
github.com/kataras/golog v0.1.9 // indirect
github.com/kataras/iris/v12 v12.2.7 // indirect
github.com/kataras/pio v0.0.12 // indirect
github.com/kataras/sitemap v0.0.6 // indirect
github.com/kataras/tunnel v0.0.4 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/labstack/echo/v4 v4.10.2 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/labstack/echo/v4 v4.11.1 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/lib/pq v1.10.4 // indirect
github.com/mailgun/raymond/v2 v2.0.48 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/microcosm-cc/bluemonday v1.0.25 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/paulmach/orb v0.9.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/paulmach/orb v0.10.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/segmentio/encoding v0.3.6 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/tdewolff/minify/v2 v2.12.9 // indirect
github.com/tdewolff/parse/v2 v2.6.8 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/mod v0.11.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.0 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yosssi/ace v0.0.5 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
golang.org/x/arch v0.5.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.10.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
github.com/bytedance/sonic v1.9.1
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/bytedance/sonic v1.10.2
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/dnstap/golang-dnstap v0.4.0
github.com/fortytw2/leaktest v1.3.0 // indirect
github.com/jessevdk/go-flags v1.5.1-0.20210607101731-3927b71304df
github.com/klauspost/compress v1.16.6 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/miekg/dns v1.1.55
github.com/miekg/dns v1.1.56
github.com/mosajjal/Go-Splunk-HTTP/splunk/v2 v2.0.7
github.com/olivere/elastic v6.2.37+incompatible
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.7.0
github.com/rogpeppe/fastuuid v1.2.0
github.com/segmentio/kafka-go v0.4.40
github.com/segmentio/kafka-go v0.4.43
github.com/sirupsen/logrus v1.9.3
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0
Expand Down
Loading

0 comments on commit f61c5c6

Please sign in to comment.