Skip to content

Commit

Permalink
Update Sarama import to use IBM version (#32)
Browse files Browse the repository at this point in the history
* Update Sarama import to use IBM version

* Make a V3 version

* Update to go 1.20
  • Loading branch information
ErwanVP authored Apr 5, 2024
1 parent 152e5b9 commit 50cb591
Show file tree
Hide file tree
Showing 23 changed files with 151 additions and 565 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ifeq (,$(shell which mockery))
$(error "No mockery in PATH, consider doing brew install mockery")
else
go mod vendor
mockery --case "underscore" --dir vendor/github.com/Shopify/sarama --output ./mocks --case "underscore" --name="(ConsumerGroupHandler)|(SyncProducer)|(ConsumerGroup)|(ConsumerGroupClaim)|(ConsumerGroupSession)"
mockery --case "underscore" --dir vendor/github.com/IBM/sarama --output ./mocks --case "underscore" --name="(ConsumerGroupHandler)|(SyncProducer)|(ConsumerGroup)|(ConsumerGroupClaim)|(ConsumerGroupSession)"
mockery --case "underscore" --dir ./ --output ./mocks --name=StdLogger
endif

Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"sync"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions example/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"encoding/json"

"github.com/Shopify/sarama"
"github.com/ricardo-ch/go-kafka/v2"
"github.com/IBM/sarama"
"github.com/ricardo-ch/go-kafka/v3"
)

func makeUserHandler(s Service) kafka.Handler {
Expand Down
2 changes: 1 addition & 1 deletion example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"log"

"github.com/ricardo-ch/go-kafka/v2"
"github.com/ricardo-ch/go-kafka/v3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion go-kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
)

// Brokers is the list of Kafka brokers to connect to.
Expand Down
51 changes: 25 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
module github.com/ricardo-ch/go-kafka/v2
module github.com/ricardo-ch/go-kafka/v3

go 1.19
go 1.20

require (
github.com/Shopify/sarama v1.37.2
github.com/IBM/sarama v1.42.1
github.com/opentracing/opentracing-go v1.2.0
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_golang v1.18.0
github.com/ricardo-ch/go-tracing v0.5.1
github.com/stretchr/testify v1.8.0
github.com/stretchr/testify v1.8.4
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/go-resiliency v1.5.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/go-kit/kit v0.9.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/go-kit/kit v0.13.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/klauspost/compress v1.15.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/klauspost/compress v1.17.5 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/uber/jaeger-client-go v2.23.1+incompatible // indirect
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
go.uber.org/atomic v1.6.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/sys v0.2.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/stretchr/objx v0.5.1 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 50cb591

Please sign in to comment.