Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into r1.0 to release ka…
Browse files Browse the repository at this point in the history
…fka-v1.1.0 (#24)

* clickhouse: fix go reference API doc (#18)

https://pkg.go.dev/trpc.group/trpc-go/trpc-database/clickhouse

* kafka: update sarama dependence (#21)

* kafka: update sarama dependence

* fix unit test

---------

Co-authored-by: Leo <[email protected]>
  • Loading branch information
liuzengh and Leoyoungxh authored Dec 22, 2023
1 parent 8ea05c2 commit 795e995
Show file tree
Hide file tree
Showing 30 changed files with 157 additions and 97 deletions.
1 change: 0 additions & 1 deletion clickhouse/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Package clickhouse 封装标准库clickhouse
package clickhouse

import (
Expand Down
6 changes: 0 additions & 6 deletions clickhouse/client_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/**
* @author aceyugong <[email protected]>
* @date 2022/7/4
*/

// Package clickhouse packages standard library clickhouse.
package clickhouse

import (
Expand Down
1 change: 0 additions & 1 deletion clickhouse/codec_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Package clickhouse packages standard library clickhouse.
package clickhouse

import (
Expand Down
6 changes: 0 additions & 6 deletions clickhouse/dsn_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/**
* @author aceyugong <[email protected]>
* @date 2022/8/19
*/

// Package clickhouse packages standard library clickhouse.
package clickhouse

import (
Expand Down
2 changes: 1 addition & 1 deletion clickhouse/mockclickhouse/clickhouse_mock.go

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

1 change: 0 additions & 1 deletion clickhouse/transport_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Package clickhouse packages standard library clickhouse.
package clickhouse

import (
Expand Down
6 changes: 3 additions & 3 deletions kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ English | [中文](README.zh_CN.md)
[![Tests](https://github.com/trpc-ecosystem/go-database/actions/workflows/kafka.yml/badge.svg)](https://github.com/trpc-ecosystem/go-database/actions/workflows/kafka.yml)
[![Coverage](https://codecov.io/gh/trpc-ecosystem/go-database/branch/main/graph/badge.svg?flag=kafka&precision=2)](https://app.codecov.io/gh/trpc-ecosystem/go-database/tree/main/kafka)

wrapping community [sarama](https://github.com/Shopify/sarama), used with trpc.
wrapping community [sarama](https://github.com/IBM/sarama), used with trpc.

## producer client

Expand Down Expand Up @@ -68,7 +68,7 @@ import (

"trpc.group/trpc-go/trpc-database/kafka"
trpc "trpc.group/trpc-go/trpc-go"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
)

func main() {
Expand Down Expand Up @@ -99,7 +99,7 @@ import (

"trpc.group/trpc-go/trpc-database/kafka"
trpc "trpc.group/trpc-go/trpc-go"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions kafka/README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Tests](https://github.com/trpc-ecosystem/go-database/actions/workflows/kafka.yml/badge.svg)](https://github.com/trpc-ecosystem/go-database/actions/workflows/kafka.yml)
[![Coverage](https://codecov.io/gh/trpc-ecosystem/go-database/branch/main/graph/badge.svg?flag=kafka&precision=2)](https://app.codecov.io/gh/trpc-ecosystem/go-database/tree/main/kafka)

封装社区的 [sarama](https://github.com/Shopify/sarama) ,配合 trpc 使用。
封装社区的 [sarama](https://github.com/IBM/sarama) ,配合 trpc 使用。

## producer client

Expand Down Expand Up @@ -67,7 +67,7 @@ import (

"trpc.group/trpc-go/trpc-database/kafka"
trpc "trpc.group/trpc-go/trpc-go"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
)

func main() {
Expand Down Expand Up @@ -97,7 +97,7 @@ import (

"trpc.group/trpc-go/trpc-database/kafka"
trpc "trpc.group/trpc-go/trpc-go"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion kafka/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"trpc.group/trpc-go/trpc-go/client"
"trpc.group/trpc-go/trpc-go/codec"
)
Expand Down
2 changes: 1 addition & 1 deletion kafka/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"flag"
"testing"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/stretchr/testify/assert"
"trpc.group/trpc-go/trpc-go/client"
)
Expand Down
2 changes: 1 addition & 1 deletion kafka/client_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"trpc.group/trpc-go/trpc-go/codec"
"trpc.group/trpc-go/trpc-go/errs"
"trpc.group/trpc-go/trpc-go/log"
Expand Down
2 changes: 1 addition & 1 deletion kafka/client_transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/stretchr/testify/assert"
"trpc.group/trpc-go/trpc-go"
"trpc.group/trpc-go/trpc-go/codec"
Expand Down
2 changes: 1 addition & 1 deletion kafka/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"trpc.group/trpc-go/trpc-go/naming/discovery"
"trpc.group/trpc-go/trpc-go/naming/servicerouter"
)
Expand Down
2 changes: 1 addition & 1 deletion kafka/config_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

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

// configParseFunc set UserConfig property.
Expand Down
2 changes: 1 addition & 1 deletion kafka/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/stretchr/testify/assert"
"trpc.group/trpc-go/trpc-go/naming/discovery"
"trpc.group/trpc-go/trpc-go/naming/registry"
Expand Down
2 changes: 1 addition & 1 deletion kafka/examples/batchconsumer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"context"
"fmt"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"trpc.group/trpc-go/trpc-database/kafka"
"trpc.group/trpc-go/trpc-go"
"trpc.group/trpc-go/trpc-go/log"
Expand Down
2 changes: 1 addition & 1 deletion kafka/examples/consumer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"context"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"trpc.group/trpc-go/trpc-database/kafka"
"trpc.group/trpc-go/trpc-go"
"trpc.group/trpc-go/trpc-go/log"
Expand Down
2 changes: 1 addition & 1 deletion kafka/examples/consumer_with_mulit_service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package main
import (
"context"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"trpc.group/trpc-go/trpc-database/kafka"
"trpc.group/trpc-go/trpc-go"
"trpc.group/trpc-go/trpc-go/log"
Expand Down
19 changes: 10 additions & 9 deletions kafka/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module trpc.group/trpc-go/trpc-database/kafka
go 1.20

require (
github.com/Shopify/sarama v1.29.1
github.com/IBM/sarama v1.40.1
github.com/golang/mock v1.4.4
github.com/smartystreets/goconvey v1.8.0
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.4
github.com/xdg-go/scram v1.1.2
golang.org/x/time v0.3.0
gopkg.in/yaml.v3 v3.0.1
Expand Down Expand Up @@ -35,15 +35,16 @@ require (
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/klauspost/compress v1.15.14 // indirect
github.com/klauspost/compress v1.16.6 // indirect
github.com/lestrrat-go/strftime v1.0.6 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/panjf2000/ants/v2 v2.4.6 // indirect
github.com/pierrec/lz4 v2.6.0+incompatible // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/smartystreets/assertions v1.13.1 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
Expand All @@ -54,11 +55,11 @@ require (
go.uber.org/automaxprocs v1.3.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
trpc.group/trpc-go/tnet v0.0.0-20230810071536-9d05338021cf // indirect
trpc.group/trpc/trpc-protocol/pb/go/trpc v0.0.0-20230803031059-de4168eb5952 // indirect
Expand Down
Loading

0 comments on commit 795e995

Please sign in to comment.