Skip to content

Commit

Permalink
Merge pull request #32 from minghsu0107/master
Browse files Browse the repository at this point in the history
  • Loading branch information
m110 authored Dec 17, 2023
2 parents 3faf2c2 + 0ebb4d3 commit ba31b43
Show file tree
Hide file tree
Showing 10 changed files with 549 additions and 82 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ test_stress:
test_reconnect:
go test -tags=reconnect ./...

test_codecov: up wait
go test -coverprofile=coverage.out -covermode=atomic ./...

fmt:
go fmt ./...
goimports -l -w .
Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
module github.com/ThreeDotsLabs/watermill-kafka/v2
module github.com/ThreeDotsLabs/watermill-kafka/v3

go 1.17

require (
github.com/Shopify/sarama v1.38.0
github.com/IBM/sarama v1.42.1
github.com/ThreeDotsLabs/watermill v1.2.0
github.com/dnwe/otelsarama v0.0.0-20231212173111-631a0a53d5d4
github.com/hashicorp/go-multierror v1.1.1
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama v0.31.0
github.com/stretchr/testify v1.8.4
)

require (
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.4.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-logr/logr v1.2.3 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // 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.11 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
go.opentelemetry.io/otel v1.6.1 // indirect
go.opentelemetry.io/otel/trace v1.6.1 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
golang.org/x/net v0.4.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
576 changes: 520 additions & 56 deletions go.sum

Large diffs are not rendered by default.

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

import (
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/ThreeDotsLabs/watermill/message"
"github.com/pkg/errors"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/kafka/marshaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package kafka_test
import (
"testing"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/ThreeDotsLabs/watermill"
"github.com/ThreeDotsLabs/watermill-kafka/v2/pkg/kafka"
"github.com/ThreeDotsLabs/watermill-kafka/v3/pkg/kafka"
"github.com/ThreeDotsLabs/watermill/message"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/kafka/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package kafka
import (
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/pkg/errors"

"github.com/ThreeDotsLabs/watermill"
Expand Down
4 changes: 2 additions & 2 deletions pkg/kafka/pubsub_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package kafka_test
import (
"testing"

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

"github.com/ThreeDotsLabs/watermill"
"github.com/ThreeDotsLabs/watermill-kafka/v2/pkg/kafka"
"github.com/ThreeDotsLabs/watermill-kafka/v3/pkg/kafka"
"github.com/ThreeDotsLabs/watermill/message"
"github.com/ThreeDotsLabs/watermill/pubsub/tests"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/kafka/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"testing"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/ThreeDotsLabs/watermill"
"github.com/ThreeDotsLabs/watermill-kafka/v2/pkg/kafka"
"github.com/ThreeDotsLabs/watermill-kafka/v3/pkg/kafka"
"github.com/ThreeDotsLabs/watermill/message"
"github.com/ThreeDotsLabs/watermill/message/subscriber"
"github.com/ThreeDotsLabs/watermill/pubsub/tests"
Expand Down
2 changes: 1 addition & 1 deletion pkg/kafka/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/hashicorp/go-multierror"
"github.com/pkg/errors"

Expand Down
4 changes: 2 additions & 2 deletions pkg/kafka/tracer.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package kafka

import (
"github.com/Shopify/sarama"
"go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama"
"github.com/IBM/sarama"
"github.com/dnwe/otelsarama"
)

type SaramaTracer interface {
Expand Down

0 comments on commit ba31b43

Please sign in to comment.