File tree Expand file tree Collapse file tree 4 files changed +111
-7
lines changed Expand file tree Collapse file tree 4 files changed +111
-7
lines changed Original file line number Diff line number Diff line change 1- cmd /jaeger-pg-store /jaeger-pg- *
2- jaeger-pg-store
3-
41# Binaries for programs and plugins
52* .exe
63* .exe~
@@ -15,4 +12,4 @@ jaeger-pg-store
1512* .out
1613
1714# Dependency directories (remove the comment below to include it)
18- # vendor/
15+ # vendor/
Original file line number Diff line number Diff line change 1+ package main
2+
3+ import (
4+ "os"
5+
6+ "github.com/hashicorp/go-hclog"
7+ "jaeger-postgresql/pgstore"
8+ "github.com/jaegertracing/jaeger/plugin/storage/grpc"
9+ "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared"
10+ )
11+
12+ func main () {
13+ logger := hclog .New (& hclog.LoggerOptions {
14+ Name : "jaeger-postgresql" ,
15+ Level : hclog .Warn , // Jaeger only captures >= Warn, so don't bother logging below Warn
16+ })
17+
18+ var store shared.StoragePlugin
19+ var closeStore func () error
20+ var err error
21+
22+ conf := pgstore.Configuration {}
23+
24+ store , closeStore , err = pgstore .NewStore (& conf , logger )
25+
26+ grpc .Serve (store )
27+
28+ if err = closeStore (); err != nil {
29+ logger .Error ("failed to close store" , "error" , err )
30+ os .Exit (1 )
31+ }
32+ }
Original file line number Diff line number Diff line change 1- module github.com/innovatrics/ jaeger-postgresql
1+ module jaeger-postgresql
22
33go 1.12
44
55require (
6+ github.com/go-pg/pg/v9 v9.2.0
7+ github.com/go-pg/urlstruct v0.2.8 // indirect
68 github.com/gogo/googleapis v1.2.0 // indirect
79 github.com/hashicorp/go-hclog v0.9.0
810 github.com/jaegertracing/jaeger v1.17.1
11+ github.com/lib/pq v1.3.0
912 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
1013 github.com/modern-go/reflect2 v1.0.1 // indirect
1114 github.com/pkg/errors v0.9.1
1215 github.com/spf13/viper v1.6.2
13- github.com/lib/pq v1.3.0
14- github.com/go-pg/pg v0.0.0-20200411070146-66252e11b106
1516)
You can’t perform that action at this time.
0 commit comments