Skip to content

Commit

Permalink
Updated to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartboyd119 committed Oct 17, 2024
1 parent cbbaa0e commit 11a708a
Show file tree
Hide file tree
Showing 28 changed files with 50 additions and 46 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# zkafka

[![License](https://img.shields.io/github/license/zillow/zkafka)](https://github.com/zillow/zkafka/blob/main/LICENSE)
[![GitHub Actions](https://github.com/zillow/zkafka/actions/workflows/go.yml/badge.svg)](https://github.com/zillow/zkafka/actions/workflows/go.yml)
[![License](https://img.shields.io/github/license/zillow/zkafka)](https://github.com/zillow/zkafka/v2/blob/main/LICENSE)
[![GitHub Actions](https://github.com/zillow/zkafka/v2/actions/workflows/go.yml/badge.svg)](https://github.com/zillow/zkafka/v2/actions/workflows/go.yml)
[![Codecov](https://codecov.io/gh/zillow/zkafka/branch/main/graph/badge.svg?token=STRT8T67YP)](https://codecov.io/gh/zillow/zkafka)
[![Go Report Card](https://goreportcard.com/badge/github.com/zillow/zkafka)](https://goreportcard.com/report/github.com/zillow/zkafka)
[![Go Report Card](https://goreportcard.com/badge/github.com/zillow/zkafka/v2)](https://goreportcard.com/report/github.com/zillow/zkafka/v2)

## Install

`go get -u github.com/zillow/zkafka`
`go get -u github.com/zillow/zkafka/v2`

## About

Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

This project adheres to Semantic Versioning.

## 2.0.0 (October 17, 2024)

1. Removed dependency on github.com/golang/mock (deprecated) in favor of github.com/uber-go/mock

## 1.3.0 (Sep 25, 2024)

1. Added `WithDisableCircuitBreaker` and `WithDisableBusyLoopBreaker` options. These are variants of the now deprecated `DisableCircuitBreaker`
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type ClientProvider interface {
// static type checking for the convenient Writer interface
var _ ClientProvider = (*Client)(nil)

const instrumentationName = "github.com/zillow/zkafka"
const instrumentationName = "github.com/zillow/zkafka/v2"

// Client helps instantiate usable readers and writers
type Client struct {
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/stretchr/testify/require"
"github.com/zillow/zfmt"
mock_confluent "github.com/zillow/zkafka/mocks/confluent"
mock_confluent "github.com/zillow/zkafka/v2/mocks/confluent"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/noop"
Expand Down
2 changes: 1 addition & 1 deletion example/producer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/zillow/zfmt"
"github.com/zillow/zkafka"
"github.com/zillow/zkafka/v2"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions example/producer_avro/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/zillow/zkafka/example/producer_avro
module github.com/zillow/zkafka/v2/example/producer_avro

go 1.23.1

replace github.com/zillow/zkafka v1.0.0 => ../..
replace github.com/zillow/zkafka/v2 v1.0.0 => ../..

require github.com/zillow/zkafka v1.0.0
require github.com/zillow/zkafka/v2 v1.0.0

require (
github.com/actgardner/gogen-avro/v10 v10.2.1 // indirect
Expand Down
2 changes: 1 addition & 1 deletion example/producer_avro/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"math/rand"
"time"

"github.com/zillow/zkafka"
"github.com/zillow/zkafka/v2"
)

//go:embed event.avsc
Expand Down
2 changes: 1 addition & 1 deletion example/worker-deadletter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"syscall"
"time"

"github.com/zillow/zkafka"
"github.com/zillow/zkafka/v2"
)

// Demonstrates reading from a topic via the zkafka.Work struct which is more convenient, typically, than using the consumer directly
Expand Down
2 changes: 1 addition & 1 deletion example/worker-delay/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"syscall"
"time"

"github.com/zillow/zkafka"
"github.com/zillow/zkafka/v2"
)

// Demonstrates reading from a topic via the zkafka.Work struct which is more convenient, typically, than using the consumer directly
Expand Down
2 changes: 1 addition & 1 deletion example/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/zillow/zfmt"
"github.com/zillow/zkafka"
"github.com/zillow/zkafka/v2"
)

// Demonstrates reading from a topic via the zkafka.Work struct which is more convenient, typically, than using the consumer directly
Expand Down
6 changes: 3 additions & 3 deletions example/worker_avro/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/zillow/zkafka/example/worker_avro
module github.com/zillow/zkafka/v2/example/worker_avro

go 1.23.1

replace github.com/zillow/zkafka v1.0.0 => ../..
replace github.com/zillow/zkafka/v2 v1.0.0 => ../..

require (
github.com/google/uuid v1.6.0
github.com/zillow/zkafka v1.0.0
github.com/zillow/zkafka/v2 v1.0.0
)

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

"github.com/google/uuid"
"github.com/zillow/zkafka"
"github.com/zillow/zkafka/v2"
)

//go:embed event.avsc
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/zillow/zkafka
module github.com/zillow/zkafka/v2

go 1.23

Expand Down
2 changes: 1 addition & 1 deletion mocks/confluent/kafka_consumer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mocks/confluent/kafka_producer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mocks/kreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package mock_zkafka
import (
"context"

"github.com/zillow/zkafka"
"github.com/zillow/zkafka/v2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion mocks/kwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package mock_zkafka
import (
"context"

"github.com/zillow/zkafka"
"github.com/zillow/zkafka/v2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion mocks/mock_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mocks/mock_reader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mocks/mock_writer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/stretchr/testify/require"
mock_confluent "github.com/zillow/zkafka/mocks/confluent"
mock_confluent "github.com/zillow/zkafka/v2/mocks/confluent"

"github.com/zillow/zfmt"
"go.uber.org/mock/gomock"
Expand Down
2 changes: 1 addition & 1 deletion test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"github.com/zillow/zfmt"
"github.com/zillow/zkafka"
"github.com/zillow/zkafka/v2"
"golang.org/x/sync/errgroup"
)

Expand Down
14 changes: 7 additions & 7 deletions test/schema_registry_evo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ import (
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"github.com/zillow/zkafka"
"github.com/zillow/zkafka/test/evolution/avro1"
"github.com/zillow/zkafka/test/evolution/avro2"
"github.com/zillow/zkafka/test/evolution/json1"
"github.com/zillow/zkafka/test/evolution/json2"
"github.com/zillow/zkafka/test/evolution/proto1"
"github.com/zillow/zkafka/test/evolution/proto2"
"github.com/zillow/zkafka/v2"
"github.com/zillow/zkafka/v2/test/evolution/avro1"
"github.com/zillow/zkafka/v2/test/evolution/avro2"
"github.com/zillow/zkafka/v2/test/evolution/json1"
"github.com/zillow/zkafka/v2/test/evolution/json2"
"github.com/zillow/zkafka/v2/test/evolution/proto1"
"github.com/zillow/zkafka/v2/test/evolution/proto2"
)

// Test_SchemaRegistryReal_Avro_AutoRegisterSchemas_BackwardCompatibleSchemasCanBeRegisteredAndReadFrom tests
Expand Down
10 changes: 5 additions & 5 deletions test/schema_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"github.com/zillow/zfmt"
"github.com/zillow/zkafka"
"github.com/zillow/zkafka/test/evolution/avro1"
avro1x "github.com/zillow/zkafka/test/evolution/avro1x"
"github.com/zillow/zkafka/test/evolution/json1"
"github.com/zillow/zkafka/test/evolution/proto1"
"github.com/zillow/zkafka/v2"
"github.com/zillow/zkafka/v2/test/evolution/avro1"
avro1x "github.com/zillow/zkafka/v2/test/evolution/avro1x"
"github.com/zillow/zkafka/v2/test/evolution/json1"
"github.com/zillow/zkafka/v2/test/evolution/proto1"
)

//go:embed evolution/schema_1.avsc
Expand Down
4 changes: 2 additions & 2 deletions test/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"github.com/zillow/zfmt"
"github.com/zillow/zkafka"
zkafka_mocks "github.com/zillow/zkafka/mocks"
"github.com/zillow/zkafka/v2"
zkafka_mocks "github.com/zillow/zkafka/v2/mocks"
"golang.org/x/sync/errgroup"

"go.uber.org/mock/gomock"
Expand Down
4 changes: 2 additions & 2 deletions test/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/stretchr/testify/require"
"github.com/zillow/zfmt"
"github.com/zillow/zkafka"
mock_confluent "github.com/zillow/zkafka/mocks/confluent"
"github.com/zillow/zkafka/v2"
mock_confluent "github.com/zillow/zkafka/v2/mocks/confluent"
"go.uber.org/mock/gomock"
)

Expand Down
2 changes: 1 addition & 1 deletion work_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"go.opentelemetry.io/otel/trace/noop"

"github.com/confluentinc/confluent-kafka-go/v2/kafka"
mock_confluent "github.com/zillow/zkafka/mocks/confluent"
mock_confluent "github.com/zillow/zkafka/v2/mocks/confluent"
"go.uber.org/mock/gomock"
)

Expand Down
2 changes: 1 addition & 1 deletion writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/stretchr/testify/require"
"github.com/zillow/zfmt"
mock_confluent "github.com/zillow/zkafka/mocks/confluent"
mock_confluent "github.com/zillow/zkafka/v2/mocks/confluent"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace/noop"
Expand Down

0 comments on commit 11a708a

Please sign in to comment.