Skip to content

Commit

Permalink
feat(global): change module name
Browse files Browse the repository at this point in the history
  • Loading branch information
alebabai committed Feb 14, 2024
1 parent 1fb8663 commit a4dc1be
Show file tree
Hide file tree
Showing 33 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ linters-settings:
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/alebabai/go-kit-kafka
local-prefixes: github.com/alebabai/go-kit-kafka/v1

linters:
enable:
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

> Apache Kafka integration module for go-kit
[![build](https://img.shields.io/github/actions/workflow/status/alebabai/go-kit-kafka/ci.yml)](https://github.com/alebabai/go-kit-kafka/actions?query=workflow%3ACI)
[![build](https://img.shields.io/github/actions/workflow/status/alebabai/go-kit-kafka/ci.yml)](https://github.com/alebabai/go-kit-kafka/v1/actions?query=workflow%3ACI)
[![version](https://img.shields.io/github/go-mod/go-version/alebabai/go-kit-kafka)](https://go.dev/)
[![report](https://goreportcard.com/badge/github.com/alebabai/go-kit-kafka)](https://goreportcard.com/report/github.com/alebabai/go-kit-kafka)
[![report](https://goreportcard.com/badge/github.com/alebabai/go-kit-kafka/v1)](https://goreportcard.com/report/github.com/alebabai/go-kit-kafka/v1)
[![coverage](https://img.shields.io/codecov/c/github/alebabai/go-kit-kafka)](https://codecov.io/github/alebabai/go-kit-kafka)
[![tag](https://img.shields.io/github/tag/alebabai/go-kit-kafka.svg)](https://github.com/alebabai/go-kit-kafka/tags)
[![reference](https://pkg.go.dev/badge/github.com/alebabai/go-kit-kafka.svg)](https://pkg.go.dev/github.com/alebabai/go-kit-kafka)
[![tag](https://img.shields.io/github/tag/alebabai/go-kit-kafka.svg)](https://github.com/alebabai/go-kit-kafka/v1/tags)
[![reference](https://pkg.go.dev/badge/github.com/alebabai/go-kit-kafka/v1.svg)](https://pkg.go.dev/github.com/alebabai/go-kit-kafka/v1)

## Getting started

Expand All @@ -16,13 +16,13 @@ Go modules are supported.
Manual install:

```bash
go get -u github.com/alebabai/go-kit-kafka
go get -u github.com/alebabai/go-kit-kafka/v1
```

Golang import:

```go
import "github.com/alebabai/go-kit-kafka/kafka"
import "github.com/alebabai/go-kit-kafka/v1/kafka"
```

## Usage
Expand Down
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/v1/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/v1/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/v1/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-kit-kafka/v1/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka/transport"
"github.com/go-kit/kit/endpoint"

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

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

go 1.16

require (
github.com/alebabai/go-kit-kafka v0.0.0
github.com/alebabai/go-kit-kafka/v1 v0.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 => ../../
replace github.com/alebabai/go-kit-kafka/v1 => ../../
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/v1/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/v1/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/v1/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-kit-kafka/v1/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka/tracing"
"github.com/alebabai/go-kit-kafka/v1/kafka/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/v1/kafka/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/v1/examples/common/consumer"
"github.com/alebabai/go-kit-kafka/v1/examples/common/domain"

"github.com/alebabai/go-kit-kafka/examples/confluent/pkg/consumer/kafka/adapter"
"github.com/alebabai/go-kit-kafka/v1/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/v1/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v1/examples/common/producer"

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

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

go 1.16

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-kit-kafka/v1 v0.0.0
github.com/alebabai/go-kit-kafka/v1/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 => ../..
replace github.com/alebabai/go-kit-kafka/v1 => ../..

replace github.com/alebabai/go-kit-kafka/examples/common => ../common
replace github.com/alebabai/go-kit-kafka/v1/examples/common => ../common
2 changes: 1 addition & 1 deletion _examples/confluent/pkg/consumer/kafka/adapter/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io"
"time"

kitkafka "github.com/alebabai/go-kit-kafka/kafka"
kitkafka "github.com/alebabai/go-kit-kafka/v1/kafka"
"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/go-kit/kit/transport"
)
Expand Down
2 changes: 1 addition & 1 deletion _examples/confluent/pkg/consumer/kafka/adapter/message.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package adapter

import (
kitkafka "github.com/alebabai/go-kit-kafka/kafka"
kitkafka "github.com/alebabai/go-kit-kafka/v1/kafka"
"github.com/confluentinc/confluent-kafka-go/kafka"
)

Expand Down
2 changes: 1 addition & 1 deletion _examples/confluent/pkg/producer/kafka/adapter/message.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package adapter

import (
kitkafka "github.com/alebabai/go-kit-kafka/kafka"
kitkafka "github.com/alebabai/go-kit-kafka/v1/kafka"
"github.com/confluentinc/confluent-kafka-go/kafka"
)

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

kitkafka "github.com/alebabai/go-kit-kafka/kafka"
kitkafka "github.com/alebabai/go-kit-kafka/v1/kafka"
"github.com/confluentinc/confluent-kafka-go/kafka"
)

Expand Down
8 changes: 4 additions & 4 deletions _examples/sarama/cmd/consumer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import (
"syscall"

"github.com/Shopify/sarama"
kafkatransport "github.com/alebabai/go-kit-kafka/kafka/transport"
kafkatransport "github.com/alebabai/go-kit-kafka/v1/kafka/transport"
"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/v1/examples/common/consumer"
"github.com/alebabai/go-kit-kafka/v1/examples/common/domain"

"github.com/alebabai/go-kit-kafka/examples/sarama/pkg/consumer/kafka/adapter"
"github.com/alebabai/go-kit-kafka/v1/examples/sarama/pkg/consumer/kafka/adapter"
)

func fatal(logger log.Logger, err error) {
Expand Down
6 changes: 3 additions & 3 deletions _examples/sarama/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/v1/examples/common/domain"
"github.com/alebabai/go-kit-kafka/v1/examples/common/producer"

"github.com/alebabai/go-kit-kafka/examples/sarama/pkg/producer/kafka/adapter"
"github.com/alebabai/go-kit-kafka/v1/examples/sarama/pkg/producer/kafka/adapter"
)

func fatal(logger log.Logger, err error) {
Expand Down
10 changes: 5 additions & 5 deletions _examples/sarama/go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/alebabai/go-kit-kafka/examples/sarama
module github.com/alebabai/go-kit-kafka/v1/examples/sarama

go 1.16

require (
github.com/Shopify/sarama v1.32.0
github.com/alebabai/go-kit-kafka v0.0.0
github.com/alebabai/go-kit-kafka/examples/common v0.0.0
github.com/alebabai/go-kit-kafka/v1 v0.0.0
github.com/alebabai/go-kit-kafka/v1/examples/common v0.0.0
github.com/go-kit/kit v0.13.0
github.com/go-kit/log v0.2.1
)

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

replace github.com/alebabai/go-kit-kafka/examples/common => ../common
replace github.com/alebabai/go-kit-kafka/v1/examples/common => ../common
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"

"github.com/Shopify/sarama"
"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
"github.com/go-kit/kit/transport"
)

Expand Down
2 changes: 1 addition & 1 deletion _examples/sarama/pkg/consumer/kafka/adapter/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package adapter

import (
"github.com/Shopify/sarama"
"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
)

func TransformMessage(msg *sarama.ConsumerMessage) *kafka.Message {
Expand Down
2 changes: 1 addition & 1 deletion _examples/sarama/pkg/producer/kafka/adapter/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package adapter

import (
"github.com/Shopify/sarama"
"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
)

func TransformMessage(msg *kafka.Message) *sarama.ProducerMessage {
Expand Down
2 changes: 1 addition & 1 deletion _examples/sarama/pkg/producer/kafka/adapter/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/Shopify/sarama"
"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
)

type Producer struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/alebabai/go-kit-kafka
module github.com/alebabai/go-kit-kafka/v1

go 1.16

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

"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
)

type KafkaContextKey string
Expand Down
4 changes: 2 additions & 2 deletions kafka/tracing/opentracing/propagation.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/go-kit/log"

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

// KafkaHeadersCarrier satisfies both [opentracing.TextMapWriter] and [opentracing.TextMapReader].
Expand Down
2 changes: 1 addition & 1 deletion kafka/transport/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/go-kit/kit/endpoint"
"github.com/go-kit/kit/transport"

"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
)

// Consumer wraps an endpoint and implements [kafka.Handler].
Expand Down
2 changes: 1 addition & 1 deletion kafka/transport/encode_decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package transport
import (
"context"

"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
)

// DecodeRequestFunc extracts a user-domain request object from
Expand Down
2 changes: 1 addition & 1 deletion kafka/transport/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/go-kit/kit/endpoint"

"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
)

// Producer wraps single Kafka topic for message producing
Expand Down
2 changes: 1 addition & 1 deletion kafka/transport/request_response_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package transport
import (
"context"

"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
)

// RequestFunc may take information from a Kafka message and put it into a
Expand Down
2 changes: 1 addition & 1 deletion kafka/transport/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/alebabai/go-kit-kafka/kafka"
"github.com/alebabai/go-kit-kafka/v1/kafka"
)

// Router represents mapping topic -> []kafka.Handler
Expand Down

0 comments on commit a4dc1be

Please sign in to comment.