Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 3bd7ebd

Browse files
committed
Fork prometheus prompb inside our repo
This commit moves the code into our repo without modifications. Future commits will modify it to enable\ us to reuse memory more effectively.
1 parent 2286518 commit 3bd7ebd

25 files changed

+5704
-20
lines changed

cmd/timescale-prometheus/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/prometheus/client_golang/prometheus"
3232
"github.com/prometheus/client_golang/prometheus/promhttp"
3333
io_prometheus_client "github.com/prometheus/client_model/go"
34-
"github.com/prometheus/prometheus/prompb"
34+
"github.com/timescale/timescale-prometheus/pkg/prompb"
3535
)
3636

3737
type config struct {

cmd/timescale-prometheus/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717

1818
"github.com/prometheus/client_golang/prometheus"
1919
dto "github.com/prometheus/client_model/go"
20-
"github.com/prometheus/prometheus/prompb"
20+
"github.com/timescale/timescale-prometheus/pkg/prompb"
2121

2222
"github.com/timescale/timescale-prometheus/pkg/log"
2323
"github.com/timescale/timescale-prometheus/pkg/pgclient"

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ require (
1010
github.com/gogo/protobuf v1.3.1
1111
github.com/golang-migrate/migrate/v4 v4.9.1
1212
github.com/golang/snappy v0.0.1
13+
github.com/grpc-ecosystem/grpc-gateway v1.14.1
1314
github.com/jackc/pgconn v1.3.2
1415
github.com/jackc/pgerrcode v0.0.0-20190803225404-afa3381909a6
1516
github.com/jackc/pgproto3/v2 v2.0.1
@@ -21,6 +22,8 @@ require (
2122
github.com/prometheus/prometheus v1.8.2-0.20200326161412-ae041f97cfc6
2223
github.com/spf13/cobra v0.0.7 // indirect
2324
github.com/testcontainers/testcontainers-go v0.3.1
25+
google.golang.org/genproto v0.0.0-20200305110556-506484158171
26+
google.golang.org/grpc v1.27.1
2427
)
2528

2629
replace github.com/jackc/pgconn => github.com/JLockerman/pgconn v1.5.3-0.20200513205926-64cd2ce264ca

pkg/pgclient/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/allegro/bigcache"
1010
"github.com/jackc/pgx/v4/pgxpool"
1111

12-
"github.com/prometheus/prometheus/prompb"
12+
"github.com/timescale/timescale-prometheus/pkg/prompb"
1313

1414
"github.com/timescale/timescale-prometheus/pkg/log"
1515
"github.com/timescale/timescale-prometheus/pkg/pgmodel"

pkg/pgmodel/end_to_end_tests/concurrent_sql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
"github.com/jackc/pgx/v4/pgxpool"
1313
"github.com/prometheus/common/model"
14-
"github.com/prometheus/prometheus/prompb"
14+
"github.com/timescale/timescale-prometheus/pkg/prompb"
1515

1616
_ "github.com/jackc/pgx/v4/stdlib"
1717
. "github.com/timescale/timescale-prometheus/pkg/pgmodel"

pkg/pgmodel/end_to_end_tests/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/jackc/pgx/v4/pgxpool"
13-
"github.com/prometheus/prometheus/prompb"
13+
"github.com/timescale/timescale-prometheus/pkg/prompb"
1414

1515
_ "github.com/jackc/pgx/v4/stdlib"
1616

pkg/pgmodel/end_to_end_tests/drop_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
_ "github.com/jackc/pgx/v4/stdlib"
1414
"github.com/prometheus/common/model"
15-
"github.com/prometheus/prometheus/prompb"
15+
"github.com/timescale/timescale-prometheus/pkg/prompb"
1616

1717
. "github.com/timescale/timescale-prometheus/pkg/pgmodel"
1818
)

pkg/pgmodel/end_to_end_tests/functions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
_ "github.com/jackc/pgx/v4/stdlib"
1717
"github.com/prometheus/common/model"
18-
"github.com/prometheus/prometheus/prompb"
18+
"github.com/timescale/timescale-prometheus/pkg/prompb"
1919
)
2020

2121
func TestSQLJsonLabelArray(t *testing.T) {

pkg/pgmodel/end_to_end_tests/nan_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
_ "github.com/jackc/pgx/v4/stdlib"
1313
"github.com/prometheus/prometheus/pkg/value"
14-
"github.com/prometheus/prometheus/prompb"
14+
"github.com/timescale/timescale-prometheus/pkg/prompb"
1515

1616
. "github.com/timescale/timescale-prometheus/pkg/pgmodel"
1717
)

pkg/pgmodel/end_to_end_tests/query_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515
"github.com/golang/snappy"
1616
"github.com/jackc/pgx/v4/pgxpool"
1717
"github.com/prometheus/prometheus/pkg/labels"
18-
"github.com/prometheus/prometheus/prompb"
1918
"github.com/prometheus/prometheus/tsdb"
2019
"github.com/timescale/timescale-prometheus/pkg/internal/testhelpers"
20+
"github.com/timescale/timescale-prometheus/pkg/prompb"
2121

2222
. "github.com/timescale/timescale-prometheus/pkg/pgmodel"
2323
)

0 commit comments

Comments
 (0)