Skip to content

Commit

Permalink
refactor(*): switch to github.com/alebabai/go-kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
alebabai committed Feb 21, 2024
1 parent 8a2214f commit 5d9dee5
Show file tree
Hide file tree
Showing 42 changed files with 121 additions and 2,933 deletions.
2 changes: 1 addition & 1 deletion examples/common/consumer/request_response.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package consumer

import (
"github.com/alebabai/go-kit-kafka/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v2/examples/common/domain"
)

type CreateEventRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/common/consumer/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package consumer
import (
"context"

"github.com/alebabai/go-kit-kafka/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v2/examples/common/domain"
)

type Service interface {
Expand Down
2 changes: 1 addition & 1 deletion examples/common/consumer/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/go-kit/log"

"github.com/alebabai/go-kit-kafka/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v2/examples/common/domain"
)

type StorageService struct {
Expand Down
6 changes: 3 additions & 3 deletions examples/common/consumer/transport_kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"encoding/json"
"fmt"

"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/kafka/transport"
"github.com/alebabai/go-kafka"
"github.com/alebabai/go-kit-kafka/v2/transport"
"github.com/go-kit/kit/endpoint"

"github.com/alebabai/go-kit-kafka/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v2/examples/common/domain"
)

func NewKafkaHandler(e endpoint.Endpoint) kafka.Handler {
Expand Down
11 changes: 7 additions & 4 deletions examples/common/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
module github.com/alebabai/go-kit-kafka/examples/common
module github.com/alebabai/go-kit-kafka/v2/examples/common

go 1.16
go 1.22

require (
github.com/alebabai/go-kit-kafka v0.0.0
github.com/alebabai/go-kafka v0.3.0
github.com/alebabai/go-kit-kafka/v2 v2.0.0
github.com/go-kit/kit v0.13.0
github.com/go-kit/log v0.2.1
github.com/google/uuid v1.2.0
github.com/gorilla/mux v1.8.0
)

replace github.com/alebabai/go-kit-kafka => ../../
require github.com/go-logfmt/logfmt v0.5.1 // indirect

replace github.com/alebabai/go-kit-kafka/v2 => ../../
740 changes: 2 additions & 738 deletions examples/common/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/common/producer/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/go-kit/log"
"github.com/google/uuid"

"github.com/alebabai/go-kit-kafka/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v2/examples/common/domain"
)

type GeneratorService struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/common/producer/request_response.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package producer

import (
"github.com/alebabai/go-kit-kafka/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v2/examples/common/domain"
)

type GenerateEventRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/common/producer/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package producer
import (
"context"

"github.com/alebabai/go-kit-kafka/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v2/examples/common/domain"
)

type Service interface {
Expand Down
6 changes: 3 additions & 3 deletions examples/common/producer/transport_kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package producer
import (
"context"

"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/kafka/tracing"
"github.com/alebabai/go-kit-kafka/kafka/transport"
"github.com/alebabai/go-kafka"
"github.com/alebabai/go-kit-kafka/v2/tracing"
"github.com/alebabai/go-kit-kafka/v2/transport"
)

func NewKafkaProducer(handler kafka.Handler, topic string) *transport.Producer {
Expand Down
8 changes: 4 additions & 4 deletions examples/confluent/cmd/consumer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (
"os/signal"
"syscall"

kafkatransport "github.com/alebabai/go-kit-kafka/kafka/transport"
kafkatransport "github.com/alebabai/go-kit-kafka/v2/transport"
"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/go-kit/kit/transport"
"github.com/go-kit/log"
"github.com/go-kit/log/level"

"github.com/alebabai/go-kit-kafka/examples/common/consumer"
"github.com/alebabai/go-kit-kafka/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v2/examples/common/consumer"
"github.com/alebabai/go-kit-kafka/v2/examples/common/domain"

"github.com/alebabai/go-kit-kafka/examples/confluent/pkg/consumer/kafka/adapter"
"github.com/alebabai/go-kit-kafka/v2/examples/confluent/pkg/consumer/kafka/adapter"
)

func fatal(logger log.Logger, err error) {
Expand Down
6 changes: 3 additions & 3 deletions examples/confluent/cmd/producer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"

"github.com/alebabai/go-kit-kafka/examples/common/domain"
"github.com/alebabai/go-kit-kafka/examples/common/producer"
"github.com/alebabai/go-kit-kafka/v2/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v2/examples/common/producer"

"github.com/alebabai/go-kit-kafka/examples/confluent/pkg/producer/kafka/adapter"
"github.com/alebabai/go-kit-kafka/v2/examples/confluent/pkg/producer/kafka/adapter"
)

func fatal(logger log.Logger, err error) {
Expand Down
19 changes: 13 additions & 6 deletions examples/confluent/go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
module github.com/alebabai/go-kit-kafka/examples/confluent
module github.com/alebabai/go-kit-kafka/v2/examples/confluent

go 1.16
go 1.22

require (
github.com/alebabai/go-kit-kafka v0.0.0
github.com/alebabai/go-kit-kafka/examples/common v0.0.0
github.com/alebabai/go-kafka v0.3.0
github.com/alebabai/go-kit-kafka/v2 v2.0.0
github.com/alebabai/go-kit-kafka/v2/examples/common v0.0.0
github.com/confluentinc/confluent-kafka-go v1.8.2
github.com/go-kit/kit v0.13.0
github.com/go-kit/log v0.2.1
)

replace github.com/alebabai/go-kit-kafka => ../..
require (
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
)

replace github.com/alebabai/go-kit-kafka/v2 => ../..

replace github.com/alebabai/go-kit-kafka/examples/common => ../common
replace github.com/alebabai/go-kit-kafka/v2/examples/common => ../common
Loading

0 comments on commit 5d9dee5

Please sign in to comment.