Skip to content

Commit 6f59f1d

Browse files
committed
Update confluent-kafka-go to v2.1.0
1 parent 78fe285 commit 6f59f1d

File tree

238 files changed

+12409
-3449
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+12409
-3449
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ jobs:
1010
- name: Checkout
1111
uses: actions/checkout@v3
1212
- name: Setup go
13-
uses: actions/setup-go@v3
13+
uses: actions/setup-go@v4
1414
with:
15-
go-version: 1.19
15+
go-version: '1.20'
16+
check-latest: true
17+
- run: go version
1618
- name: Run build
1719
run: make clean build
1820
- name: Run test

.github/workflows/release.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v3
1919
- name: Setup go
20-
uses: actions/setup-go@v3
20+
uses: actions/setup-go@v4
2121
with:
22-
go-version: 1.19
22+
go-version: '1.20'
23+
check-latest: true
24+
- run: go version
2325
- name: Run build
2426
run: make clean build
2527
- name: Run test

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.19-alpine3.16 as builder
1+
FROM golang:1.20-alpine3.16 as builder
22

33
RUN apk add alpine-sdk ca-certificates
44

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.PHONY: clean build fmt test
44

5-
TAG ?= v0.2.0
5+
TAG ?= v0.3.0
66

77
BUILD_FLAGS ?=
88
BINARY ?= mqtt-proxy

cmd/root_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cmd
22

33
import (
44
"github.com/alecthomas/kong"
5-
"github.com/confluentinc/confluent-kafka-go/kafka"
5+
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
66
"github.com/grepplabs/mqtt-proxy/pkg/config"
77
"github.com/grepplabs/mqtt-proxy/pkg/log"
88
"github.com/stretchr/testify/require"

go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module github.com/grepplabs/mqtt-proxy
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/alecthomas/kong v0.7.0
77
github.com/alecthomas/kong-yaml v0.1.1
8-
github.com/confluentinc/confluent-kafka-go v1.9.2
8+
github.com/confluentinc/confluent-kafka-go/v2 v2.1.0
99
github.com/go-playground/validator/v10 v10.11.1
1010
github.com/oklog/run v1.1.0
1111
github.com/prometheus/client_golang v1.13.1
1212
github.com/prometheus/common v0.37.0
13-
github.com/stretchr/testify v1.8.1
13+
github.com/stretchr/testify v1.8.2
1414
github.com/sykesm/zap-logfmt v0.0.4
1515
go.uber.org/atomic v1.10.0
1616
go.uber.org/automaxprocs v1.5.1
@@ -19,21 +19,21 @@ require (
1919

2020
require (
2121
github.com/beorn7/perks v1.0.1 // indirect
22-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
22+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
2323
github.com/davecgh/go-spew v1.1.1 // indirect
2424
github.com/go-playground/locales v0.14.0 // indirect
2525
github.com/go-playground/universal-translator v0.18.0 // indirect
26-
github.com/golang/protobuf v1.5.2 // indirect
26+
github.com/golang/protobuf v1.5.3 // indirect
2727
github.com/leodido/go-urn v1.2.1 // indirect
2828
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
2929
github.com/pmezard/go-difflib v1.0.0 // indirect
3030
github.com/prometheus/client_model v0.3.0 // indirect
3131
github.com/prometheus/procfs v0.8.0 // indirect
3232
go.uber.org/multierr v1.8.0 // indirect
3333
golang.org/x/crypto v0.1.0 // indirect
34-
golang.org/x/sys v0.1.0 // indirect
35-
golang.org/x/text v0.4.0 // indirect
36-
google.golang.org/protobuf v1.28.1 // indirect
34+
golang.org/x/sys v0.6.0 // indirect
35+
golang.org/x/text v0.8.0 // indirect
36+
google.golang.org/protobuf v1.30.0 // indirect
3737
gopkg.in/yaml.v2 v2.4.0 // indirect
3838
gopkg.in/yaml.v3 v3.0.1 // indirect
3939
)

go.sum

Lines changed: 1915 additions & 27 deletions
Large diffs are not rendered by default.

pkg/config/config.go

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

99
"github.com/alecthomas/kong"
10-
"github.com/confluentinc/confluent-kafka-go/kafka"
10+
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
1111
"github.com/go-playground/validator/v10"
1212
)
1313

pkg/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package config
22

33
import (
4-
"github.com/confluentinc/confluent-kafka-go/kafka"
4+
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
55
"github.com/stretchr/testify/assert"
66
"regexp"
77
"testing"

pkg/publisher/kafka/kafka.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"sync"
1111
"time"
1212

13-
"github.com/confluentinc/confluent-kafka-go/kafka"
13+
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
1414
"github.com/grepplabs/mqtt-proxy/apis"
1515
"github.com/grepplabs/mqtt-proxy/pkg/log"
1616
"github.com/grepplabs/mqtt-proxy/pkg/runtime"
@@ -117,7 +117,7 @@ func (s *Publisher) Shutdown(err error) {
117117
}
118118

119119
func (s *Publisher) shutdown(ctx context.Context) error {
120-
if !s.inShutdown.CAS(false, true) {
120+
if !s.inShutdown.CompareAndSwap(false, true) {
121121
return nil
122122
}
123123
defer s.Close()
@@ -139,7 +139,7 @@ func (s *Publisher) shutdown(ctx context.Context) error {
139139
}
140140
}
141141

142-
func (s Publisher) Name() string {
142+
func (s *Publisher) Name() string {
143143
return publisherName
144144
}
145145

0 commit comments

Comments
 (0)