Skip to content

Commit

Permalink
Merge pull request #55 from etf1/update-go122
Browse files Browse the repository at this point in the history
Update go 1.22 + kafka-go v2
  • Loading branch information
ldechoux authored Apr 5, 2024
2 parents 9129223 + 13cdd32 commit 00a04c2
Show file tree
Hide file tree
Showing 18 changed files with 211 additions and 344 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Build & test
run: make tests.docker
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.15
go-version: ^1.22

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run tests in docker
run: make tests.docker
Expand Down
2 changes: 1 addition & 1 deletion clientlib/clientlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/etf1/kafka-message-scheduler/clientlib/retry"
)

Expand Down
2 changes: 1 addition & 1 deletion clientlib/clientlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/etf1/kafka-message-scheduler/clientlib/retry"
)

Expand Down
4 changes: 2 additions & 2 deletions clientlib/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/etf1/kafka-message-scheduler/clientlib

go 1.15
go 1.22

require github.com/confluentinc/confluent-kafka-go v1.9.2
require github.com/confluentinc/confluent-kafka-go/v2 v2.3.0
277 changes: 69 additions & 208 deletions clientlib/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clientlib/helper.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package clientlib

import (
"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func getHeader(message *kafka.Message, name string) kafka.Header {
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"strings"

confluent "github.com/confluentinc/confluent-kafka-go/kafka"
confluent "github.com/confluentinc/confluent-kafka-go/v2/kafka"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
)
Expand Down
31 changes: 24 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
module github.com/etf1/kafka-message-scheduler

go 1.15
go 1.22

require (
github.com/confluentinc/confluent-kafka-go v1.9.2
github.com/confluentinc/confluent-kafka-go/v2 v2.3.0
github.com/gemnasium/logrus-graylog-hook v2.0.7+incompatible
github.com/gorilla/mux v1.7.3
github.com/prometheus/client_golang v1.8.0
github.com/sirupsen/logrus v1.7.0
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
gopkg.in/yaml.v2 v2.3.0
github.com/gorilla/mux v1.8.1
github.com/prometheus/client_golang v1.19.0
github.com/sirupsen/logrus v1.9.3
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.52.2 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
211 changes: 100 additions & 111 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/test/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"testing"
"time"

confluent "github.com/confluentinc/confluent-kafka-go/kafka"
confluent "github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/etf1/kafka-message-scheduler/internal/helper"
"github.com/etf1/kafka-message-scheduler/schedule/kafka"
kafka_store "github.com/etf1/kafka-message-scheduler/store/kafka"
Expand Down
2 changes: 1 addition & 1 deletion runner/kafka/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

log "github.com/sirupsen/logrus"

confluent "github.com/confluentinc/confluent-kafka-go/kafka"
confluent "github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/etf1/kafka-message-scheduler/schedule"
"github.com/etf1/kafka-message-scheduler/schedule/kafka"
"github.com/etf1/kafka-message-scheduler/scheduler"
Expand Down
2 changes: 1 addition & 1 deletion runner/kafka/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

confluent "github.com/confluentinc/confluent-kafka-go/kafka"
confluent "github.com/confluentinc/confluent-kafka-go/v2/kafka"
hmapcoll "github.com/etf1/kafka-message-scheduler/internal/collector/hmap"
"github.com/etf1/kafka-message-scheduler/internal/helper"
"github.com/etf1/kafka-message-scheduler/internal/test"
Expand Down
2 changes: 1 addition & 1 deletion schedule/kafka/schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"time"

confluent "github.com/confluentinc/confluent-kafka-go/kafka"
confluent "github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/etf1/kafka-message-scheduler/schedule"
)

Expand Down
2 changes: 1 addition & 1 deletion store/kafka/helper.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package kafka

import (
confluent "github.com/confluentinc/confluent-kafka-go/kafka"
confluent "github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func isEquals(a, b confluent.TopicPartition) bool {
Expand Down
2 changes: 1 addition & 1 deletion store/kafka/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

log "github.com/sirupsen/logrus"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/etf1/kafka-message-scheduler/schedule"
kafka_schedule "github.com/etf1/kafka-message-scheduler/schedule/kafka"
)
Expand Down
2 changes: 1 addition & 1 deletion store/kafka/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

log "github.com/sirupsen/logrus"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/etf1/kafka-message-scheduler/schedule"
kafka_schedule "github.com/etf1/kafka-message-scheduler/schedule/kafka"
"github.com/etf1/kafka-message-scheduler/store"
Expand Down
2 changes: 1 addition & 1 deletion store/kafka/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

confluent "github.com/confluentinc/confluent-kafka-go/kafka"
confluent "github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/etf1/kafka-message-scheduler/internal/test"
"github.com/etf1/kafka-message-scheduler/schedule"
kafka_schedule "github.com/etf1/kafka-message-scheduler/schedule/kafka"
Expand Down

0 comments on commit 00a04c2

Please sign in to comment.