Skip to content

Commit

Permalink
Removed sarama-cluster dependency and changed cluster handling to sar…
Browse files Browse the repository at this point in the history
…ama's native ConsumerGroup.
  • Loading branch information
michalkurzeja authored Nov 8, 2019
1 parent 4142bda commit 7269f52
Show file tree
Hide file tree
Showing 34 changed files with 497 additions and 306 deletions.
2 changes: 1 addition & 1 deletion cache/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"time"

"github.com/msales/pkg/v3/cache"
"github.com/msales/streams/v3"
"github.com/msales/streams/v4"
)

// Sink represents a Cache streams sink.
Expand Down
6 changes: 3 additions & 3 deletions cache/sink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"time"

cache2 "github.com/msales/pkg/v3/cache"
"github.com/msales/streams/v3"
"github.com/msales/streams/v3/cache"
"github.com/msales/streams/v3/mocks"
"github.com/msales/streams/v4"
"github.com/msales/streams/v4/cache"
"github.com/msales/streams/v4/mocks"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)
Expand Down
2 changes: 1 addition & 1 deletion channel/sink.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package channel

import "github.com/msales/streams/v3"
import "github.com/msales/streams/v4"

// Sink represents a channel sink.
type Sink struct {
Expand Down
6 changes: 3 additions & 3 deletions channel/sink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package channel_test
import (
"testing"

"github.com/msales/streams/v3"
"github.com/msales/streams/v3/channel"
"github.com/msales/streams/v3/mocks"
"github.com/msales/streams/v4"
"github.com/msales/streams/v4/channel"
"github.com/msales/streams/v4/mocks"
"github.com/stretchr/testify/assert"
)

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

"github.com/msales/streams/v3"
"github.com/msales/streams/v4"
)

// Compile-time interface check.
Expand Down
4 changes: 2 additions & 2 deletions channel/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package channel_test
import (
"testing"

"github.com/msales/streams/v3"
"github.com/msales/streams/v3/channel"
"github.com/msales/streams/v4"
"github.com/msales/streams/v4/channel"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion example/benchmark/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/msales/pkg/v3/clix"
"github.com/msales/pkg/v3/stats"
"github.com/msales/streams/v3"
"github.com/msales/streams/v4"
)

import _ "net/http/pprof"
Expand Down
2 changes: 1 addition & 1 deletion example/branch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/msales/pkg/v3/clix"
"github.com/msales/pkg/v3/stats"
"github.com/msales/streams/v3"
"github.com/msales/streams/v4"
)

func main() {
Expand Down
5 changes: 3 additions & 2 deletions example/kafka/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/Shopify/sarama"
"github.com/msales/pkg/v3/clix"
"github.com/msales/pkg/v3/stats"
"github.com/msales/streams/v3"
"github.com/msales/streams/v3/kafka"
"github.com/msales/streams/v4"
"github.com/msales/streams/v4/kafka"
)

// BatchSize is the size of commit batches.
Expand All @@ -25,6 +25,7 @@ func main() {

config := sarama.NewConfig()
config.Producer.Return.Successes = true
config.Version = sarama.V2_1_0_0

client, err := stats.NewBufferedStatsd("localhost:8125", "streams.example")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion example/merge/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os/signal"
"syscall"

"github.com/msales/streams/v3"
"github.com/msales/streams/v4"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion example/simple/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os/signal"
"syscall"

"github.com/msales/streams/v3"
"github.com/msales/streams/v4"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion fakes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"time"

"github.com/msales/streams/v3"
"github.com/msales/streams/v4"
)

type fakeSource struct {
Expand Down
20 changes: 10 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
module github.com/msales/streams/v3
module github.com/msales/streams/v4

go 1.13

require (
github.com/DATA-DOG/go-sqlmock v1.3.3
github.com/DataDog/zstd v1.4.0 // indirect
github.com/Shopify/sarama v1.23.0
github.com/Shopify/sarama v1.24.1
github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668 // indirect
github.com/bsm/sarama-cluster v2.1.15+incompatible
github.com/go-redis/redis v6.15.2+incompatible // indirect
github.com/cactus/go-statsd-client v3.2.0+incompatible // indirect
github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/msales/pkg/v3 v3.17.0
github.com/msales/pkg/v3 v3.20.0
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v0.9.3 // indirect
github.com/prometheus/common v0.4.1 // indirect
github.com/prometheus/procfs v0.0.0-20190528151240-3cb620ac02d0 // indirect
github.com/pkg/profile v1.2.1 // indirect
github.com/prometheus/client_golang v1.2.1 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.3.0
golang.org/x/net v0.0.0-20190522155817-f3200d17e092 // indirect
golang.org/x/sys v0.0.0-20190529085034-854af27f14a7 // indirect
golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd // indirect
golang.org/x/text v0.3.2 // indirect
)
74 changes: 60 additions & 14 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion kafka/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"testing"

"github.com/msales/streams/v3/kafka"
"github.com/msales/streams/v4/kafka"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion kafka/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/Shopify/sarama"
"github.com/msales/streams/v3"
"github.com/msales/streams/v4"
)

// SinkConfig represents the configuration of a Sink.
Expand Down
2 changes: 1 addition & 1 deletion kafka/sink_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/Shopify/sarama"
"github.com/msales/streams/v3"
"github.com/msales/streams/v4"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
)
Expand Down
6 changes: 3 additions & 3 deletions kafka/sink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"

"github.com/Shopify/sarama"
"github.com/msales/streams/v3"
"github.com/msales/streams/v3/kafka"
"github.com/msales/streams/v3/mocks"
"github.com/msales/streams/v4"
"github.com/msales/streams/v4/kafka"
"github.com/msales/streams/v4/mocks"
"github.com/stretchr/testify/assert"
)

Expand Down
Loading

0 comments on commit 7269f52

Please sign in to comment.