Skip to content

Commit

Permalink
feat: support for local build in arm64/apple silicon (#59)
Browse files Browse the repository at this point in the history
* use version 1.9.2

* bump confluent client version

* comment import

* fix: go.mod and go.sum files

* refactor: remove vendor imports

* bump version to v2 for confluent kafka-go

* bump golang version to 1.20

* bump go.mod to 1.20

* revert to version 1.9.x

* revert to version 1.14

* bump version.txt to v0.2.1
  • Loading branch information
punit-kulal authored Jul 18, 2023
1 parent 8a6c348 commit b7d1fcf
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 37 deletions.
2 changes: 1 addition & 1 deletion config/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"os"
"strings"

confluent "github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/raystack/raccoon/config/util"
"github.com/spf13/viper"
confluent "gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
)

var PublisherKafka publisherKafka
Expand Down
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ module github.com/raystack/raccoon
go 1.14

require (
github.com/confluentinc/confluent-kafka-go v1.4.2 // indirect
github.com/confluentinc/confluent-kafka-go v1.9.3-RC3
github.com/gorilla/mux v1.7.4
github.com/gorilla/websocket v1.4.2
github.com/sirupsen/logrus v1.6.0
github.com/spf13/viper v1.7.0
github.com/stretchr/testify v1.7.0
golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3 // indirect
google.golang.org/grpc v1.41.0
github.com/stretchr/testify v1.7.1
google.golang.org/grpc v1.46.0
google.golang.org/protobuf v1.31.0
gopkg.in/alexcesaro/statsd.v2 v2.0.0
gopkg.in/confluentinc/confluent-kafka-go.v1 v1.4.2
)
130 changes: 109 additions & 21 deletions go.sum

Large diffs are not rendered by default.

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

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/gorilla/websocket"
pb "github.com/raystack/raccoon/proto"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"
"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
)

var uuid string
Expand Down
2 changes: 1 addition & 1 deletion publisher/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package publisher

import (
"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
"github.com/confluentinc/confluent-kafka-go/kafka"
)

type Client interface {
Expand Down
4 changes: 1 addition & 3 deletions publisher/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import (
"fmt"
"strings"

"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
// Importing librd to make it work on vendor mode
_ "gopkg.in/confluentinc/confluent-kafka-go.v1/kafka/librdkafka"
"github.com/confluentinc/confluent-kafka-go/kafka"

"github.com/raystack/raccoon/config"
"github.com/raystack/raccoon/logger"
Expand Down
2 changes: 1 addition & 1 deletion publisher/kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"os"
"testing"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/raystack/raccoon/logger"
pb "github.com/raystack/raccoon/proto"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion publisher/mockclient.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package publisher

import (
"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/stretchr/testify/mock"
"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
)

type mockClient struct {
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.4
v0.2.1
2 changes: 1 addition & 1 deletion worker/mocks.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package worker

import (
kafka "github.com/confluentinc/confluent-kafka-go/kafka"
pb "github.com/raystack/raccoon/proto"
mock "github.com/stretchr/testify/mock"
kafka "gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
)

// KafkaProducer is an autogenerated mock type for the KafkaProducer type
Expand Down
2 changes: 1 addition & 1 deletion worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"sync"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/raystack/raccoon/collection"
"github.com/raystack/raccoon/logger"
"github.com/raystack/raccoon/metrics"
"github.com/raystack/raccoon/publisher"
"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
)

// Pool spawn goroutine as much as Size that will listen to EventsChannel. On Close, wait for all data in EventsChannel to be processed.
Expand Down

0 comments on commit b7d1fcf

Please sign in to comment.