Skip to content

Commit 7e0542e

Browse files
authored
Fix getProxies to reflect changes in GatewayD v0.9.7+ (#84)
* Update deps * Refactor getProxies to use gRPC for communication with GatewayD * Include config blocks as another nested key when unmarshaling list of proxies * Allow api/v1 package * Refactor and update tests to reflect changes * Upgrade Go to v1.23 * Enable coverage reporting to coveralls * Remove deprecated linters * Fix defer before exit
1 parent 05cc7e7 commit 7e0542e

File tree

12 files changed

+170
-225
lines changed

12 files changed

+170
-225
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: actions/checkout@v3
1717
with:
1818
fetch-depth: 0
19-
- name: Set up Go 1.22
19+
- name: Set up Go 1.23
2020
uses: actions/setup-go@v3
2121
with:
22-
go-version: "1.22"
22+
go-version: "1.23"
2323
cache: true
2424
- name: Install dependencies
2525
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu

.github/workflows/test.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@ jobs:
2323
- name: Install Go 🧑‍💻
2424
uses: actions/setup-go@v3
2525
with:
26-
go-version: '1.22'
26+
go-version: "1.23"
2727

2828
- name: Lint code issues 🚨
2929
uses: golangci/golangci-lint-action@v3
3030

3131
- name: Run Go tests 🔬
3232
run: go test -cover -covermode atomic -coverprofile=profile.cov -v ./...
3333

34-
# Enable coverage reporting
35-
# - name: Report coverage to coveralls 📈
36-
# uses: shogo82148/actions-goveralls@v1
37-
# with:
38-
# path-to-profile: profile.cov
34+
- name: Report coverage to coveralls 📈
35+
uses: shogo82148/actions-goveralls@v1
36+
with:
37+
path-to-profile: profile.cov

.golangci.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,14 @@ linters:
1212
- nlreturn
1313
- testpackage
1414
- paralleltest
15-
- exhaustivestruct
1615
- exhaustruct
1716
- gocognit
1817
- gochecknoinits
1918
- gocyclo
20-
- maligned
2119
- funlen
2220
- maintidx
2321
- musttag
24-
- nosnakecase
2522
- wrapcheck
26-
- golint
27-
- scopelint
28-
- interfacer
29-
- varcheck
30-
- deadcode
31-
- ifshort
32-
- structcheck
3323
linters-settings:
3424
depguard:
3525
rules:
@@ -39,6 +29,7 @@ linters-settings:
3929
- "!$test"
4030
allow:
4131
- $gostd
32+
- "github.com/gatewayd-io/gatewayd/api/v1"
4233
- "github.com/gatewayd-io/gatewayd-plugin-sdk"
4334
- "github.com/gatewayd-io/gatewayd-plugin-cache"
4435
- "github.com/prometheus/client_golang"

go.mod

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
module github.com/gatewayd-io/gatewayd-plugin-cache
22

3-
go 1.22
3+
go 1.23.1
44

55
require (
66
github.com/alicebob/miniredis/v2 v2.30.5
7-
github.com/gatewayd-io/gatewayd-plugin-sdk v0.2.16
8-
github.com/getsentry/sentry-go v0.27.0
7+
github.com/gatewayd-io/gatewayd v0.9.7
8+
github.com/gatewayd-io/gatewayd-plugin-sdk v0.3.1
9+
github.com/getsentry/sentry-go v0.28.1
910
github.com/go-co-op/gocron v1.37.0
1011
github.com/go-redis/redis/v8 v8.11.5
1112
github.com/hashicorp/go-hclog v1.6.3
1213
github.com/hashicorp/go-plugin v1.6.1
13-
github.com/jackc/pgx/v5 v5.6.0
14-
github.com/prometheus/client_golang v1.19.1
15-
github.com/spf13/cast v1.6.0
14+
github.com/jackc/pgx/v5 v5.7.0
15+
github.com/prometheus/client_golang v1.20.3
16+
github.com/spf13/cast v1.7.0
1617
github.com/stretchr/testify v1.9.0
1718
github.com/zenizh/go-capturer v0.0.0-20211219060012-52ea6c8fed04
18-
google.golang.org/grpc v1.64.0
19+
google.golang.org/grpc v1.66.0
20+
google.golang.org/protobuf v1.34.2
1921
)
2022

2123
require (
@@ -28,28 +30,31 @@ require (
2830
github.com/fatih/color v1.17.0 // indirect
2931
github.com/golang/protobuf v1.5.4 // indirect
3032
github.com/google/uuid v1.6.0 // indirect
33+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
3134
github.com/hashicorp/yamux v0.1.1 // indirect
35+
github.com/klauspost/compress v1.17.9 // indirect
3236
github.com/mattn/go-colorable v0.1.13 // indirect
3337
github.com/mattn/go-isatty v0.0.20 // indirect
3438
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
39+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3540
github.com/oklog/run v1.1.0 // indirect
3641
github.com/pganalyze/pg_query_go/v5 v5.1.0 // indirect
3742
github.com/pmezard/go-difflib v1.0.0 // indirect
3843
github.com/prometheus/client_model v0.6.1 // indirect
39-
github.com/prometheus/common v0.54.0 // indirect
44+
github.com/prometheus/common v0.59.1 // indirect
4045
github.com/prometheus/procfs v0.15.1 // indirect
41-
github.com/redis/go-redis/v9 v9.5.2 // indirect
46+
github.com/redis/go-redis/v9 v9.6.1 // indirect
4247
github.com/robfig/cron/v3 v3.0.1 // indirect
4348
github.com/rs/zerolog v1.33.0 // indirect
44-
github.com/tetratelabs/wazero v1.7.2 // indirect
45-
github.com/wasilibs/go-pgquery v0.0.0-20240606042535-c0843d6592cc // indirect
46-
github.com/wasilibs/wazero-helpers v0.0.0-20240604052452-61d7981e9a38 // indirect
49+
github.com/tetratelabs/wazero v1.8.0 // indirect
50+
github.com/wasilibs/go-pgquery v0.0.0-20240826014338-9ea9e19d01fd // indirect
51+
github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52 // indirect
4752
github.com/yuin/gopher-lua v1.1.0 // indirect
4853
go.uber.org/atomic v1.11.0 // indirect
49-
golang.org/x/net v0.26.0 // indirect
50-
golang.org/x/sys v0.21.0 // indirect
51-
golang.org/x/text v0.16.0 // indirect
52-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
53-
google.golang.org/protobuf v1.34.1 // indirect
54+
golang.org/x/net v0.29.0 // indirect
55+
golang.org/x/sys v0.25.0 // indirect
56+
golang.org/x/text v0.18.0 // indirect
57+
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
58+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
5459
gopkg.in/yaml.v3 v3.0.1 // indirect
5560
)

0 commit comments

Comments
 (0)