Skip to content

Commit

Permalink
feat: update Shopify/sarama to IBM/sarama, remove cache committer due…
Browse files Browse the repository at this point in the history
… to unmaintained dependency
  • Loading branch information
Skandalik committed May 27, 2024
1 parent 47d77eb commit 1cd2e8e
Show file tree
Hide file tree
Showing 34 changed files with 422 additions and 601 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,32 @@ name: Test

on: push

env:
GO111MODULE: on

jobs:
test:
build:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22', '1.22.x' ]

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

- name: Checkout actions repository
uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
repository: msales/github-actions
ref: master
token: ${{ secrets.GH_TOKEN }}
path: .github/actions/external

- name: Run the tests
id: test
uses: ./.github/actions/external/go-test
with:
org_token: ${{ secrets.GH_TOKEN }}
test: true
vet: true
race: false
go-version: ${{ matrix.go-version }}

- name: Display Go version
run: go version

- name: Vet
run: go vet ./...

- name: Test
run: go test -race -bench=. -covermode=atomic -coverpkg=github.com/msales/streams/... ./...

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
Streams is a light weight, simple stream processing library. While Kafka is the main use case for Streams, it is
flexible enough to be used for any form of processing from any source.


## Installation

You can install streams using `go get`
Expand All @@ -29,8 +28,9 @@ Streams breaks processing into the following basic parts.

* **Processor** processes the data, optionally passing it on or marking the sources position. A sink is just a processor
the does not forward the data on.

* **Pipe** gives processors an abstract view of the current state, allowing Messages to flow through the system.

### Read more here:
### Read more here:

https://medium.com/@rafamnich/getting-started-with-streams-v3-b9ab36fb9d54
55 changes: 0 additions & 55 deletions cache/sink.go

This file was deleted.

116 changes: 0 additions & 116 deletions cache/sink_test.go

This file was deleted.

3 changes: 2 additions & 1 deletion channel/sink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package channel_test
import (
"testing"

"github.com/stretchr/testify/assert"

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

func TestNewSink(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion channel/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package channel_test
import (
"testing"

"github.com/stretchr/testify/assert"

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

func TestNewSource(t *testing.T) {
Expand Down
38 changes: 19 additions & 19 deletions example/kafka/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
version: "3"

services:
zookeeper:
image: zookeeper:3.5
environment:
ZOO_STANDALONE_ENABLED: "TRUE"
ports:
- '2181:2181'
restart: on-failure
zookeeper:
image: zookeeper:3.5
environment:
ZOO_STANDALONE_ENABLED: "TRUE"
ports:
- '2181:2181'
restart: on-failure

kafka:
image: wurstmeister/kafka:2.12-2.1.0
environment:
KAFKA_ADVERTISED_HOST_NAME: 'localhost'
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "example1:1:1"
ports:
- '9092:9092'
depends_on:
- zookeeper
restart: on-failure
kafka:
image: wurstmeister/kafka:2.12-2.1.0
environment:
KAFKA_ADVERTISED_HOST_NAME: 'localhost'
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "example1:1:1"
ports:
- '9092:9092'
depends_on:
- zookeeper
restart: on-failure
2 changes: 1 addition & 1 deletion example/kafka/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"syscall"

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

"github.com/msales/streams/v6"
"github.com/msales/streams/v6/kafka"
Expand Down
40 changes: 20 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
module github.com/msales/streams/v6

go 1.17
go 1.22

require (
github.com/DATA-DOG/go-sqlmock v1.4.1
github.com/Shopify/sarama v1.30.0
github.com/msales/pkg/v4 v4.4.0
github.com/stretchr/testify v1.7.0
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/IBM/sarama v1.43.2
github.com/stretchr/testify v1.9.0
github.com/xdg/scram v1.0.5
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
)

require (
github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eapache/go-resiliency v1.2.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/go-resiliency v1.6.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-redis/redis v6.15.7+incompatible // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/go-uuid v1.0.2 // 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.0.0 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/stretchr/objx v0.1.1 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/xdg/stringprep v1.0.3 // indirect
golang.org/x/crypto v0.0.0-20210920023735-84f357641f63 // indirect
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/text v0.15.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 1cd2e8e

Please sign in to comment.