common/kafka: switch to github.com/IBM/sarama

This commit is contained in:
Vincent Bernat
2023-07-18 08:01:31 +02:00
parent 7cd7a63210
commit d2ebd76a5d
18 changed files with 20 additions and 20 deletions

View File

@@ -16,7 +16,7 @@ import (
"akvorado/common/helpers/bimap"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
)
// Configuration defines how we connect to a Kafka cluster.

View File

@@ -8,7 +8,7 @@ import (
"akvorado/common/helpers"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/gin-gonic/gin"
)

View File

@@ -7,7 +7,7 @@ import (
"fmt"
"sync/atomic"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"akvorado/common/reporter"
)

View File

@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2013 Shopify
// SPDX-License-Identifier: MIT
// From https://github.com/Shopify/sarama/blob/main/examples/sasl_scram_client/scram_client.go
// From https://github.com/IBM/sarama/blob/main/examples/sasl_scram_client/scram_client.go
package kafka

View File

@@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"akvorado/common/helpers"
)

View File

@@ -106,7 +106,7 @@ of the databases in order to update a local cached copy.
## Kafka
The Kafka component relies on
[Sarama](https://github.com/Shopify/sarama). It is tested using the
[Sarama](https://github.com/IBM/sarama). It is tested using the
mock interface provided by this package. *Sarama* uses `go-metrics` to
store metrics. We convert them to Prometheus to keep them. The logger
is global and there is a hack to be plug it into the reporter design

2
go.mod
View File

@@ -4,7 +4,7 @@ go 1.19
require (
github.com/ClickHouse/clickhouse-go/v2 v2.10.1
github.com/Shopify/sarama v1.38.1
github.com/IBM/sarama v1.40.0
github.com/alecthomas/chroma v0.10.0
github.com/antonmedv/expr v1.12.6
github.com/benbjohnson/clock v1.3.5

4
go.sum
View File

@@ -4,10 +4,10 @@ github.com/ClickHouse/ch-go v0.52.1 h1:nucdgfD1BDSHjbNaG3VNebonxJzD8fX8jbuBpfo5V
github.com/ClickHouse/ch-go v0.52.1/go.mod h1:B9htMJ0hii/zrC2hljUKdnagRBuLqtRG/GrU3jqCwRk=
github.com/ClickHouse/clickhouse-go/v2 v2.10.1 h1:WCnusqEeCO/9sLFVIv57le/O1ydUb+x9+SYYhJ11fsY=
github.com/ClickHouse/clickhouse-go/v2 v2.10.1/go.mod h1:teXfZNM90iQ99Jnuht+dxQXCuhDZ8nvvMoTJOFrcmcg=
github.com/IBM/sarama v1.40.0 h1:QTVmX+gMKye52mT5x+Ve/Bod2D0Gy7ylE2Wslv+RHtc=
github.com/IBM/sarama v1.40.0/go.mod h1:6pBloAs1WanL/vsq5qFTyTGulJUntZHhMLOUYEIs9mg=
github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA=
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
github.com/Shopify/sarama v1.38.1 h1:lqqPUPQZ7zPqYlWpTh+LQ9bhYNu2xJL6k1SJN4WVe2A=
github.com/Shopify/sarama v1.38.1/go.mod h1:iwv9a67Ha8VNa+TifujYoWGxWnu2kNVAQdSdZ4X2o5g=
github.com/Shopify/toxiproxy/v2 v2.5.0 h1:i4LPT+qrSlKNtQf5QliVjdP08GyAH8+BUIc9gT0eahc=
github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=
github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s=

View File

@@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/gin-gonic/gin"
"github.com/mitchellh/mapstructure"

View File

@@ -14,7 +14,7 @@ import (
"testing"
"time"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/gin-gonic/gin"
"akvorado/common/daemon"

View File

@@ -6,7 +6,7 @@ package kafka
import (
"time"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"akvorado/common/kafka"
)

View File

@@ -8,7 +8,7 @@ import (
"akvorado/common/helpers"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
)
func TestCompressionCodecUnmarshal(t *testing.T) {

View File

@@ -10,7 +10,7 @@ import (
"testing"
"time"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"akvorado/common/daemon"
"akvorado/common/helpers"

View File

@@ -11,7 +11,7 @@ import (
"strings"
"time"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"gopkg.in/tomb.v2"
"akvorado/common/daemon"

View File

@@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
gometrics "github.com/rcrowley/go-metrics"
"akvorado/common/daemon"

View File

@@ -8,8 +8,8 @@ package kafka
import (
"testing"
"github.com/Shopify/sarama"
"github.com/Shopify/sarama/mocks"
"github.com/IBM/sarama"
"github.com/IBM/sarama/mocks"
"akvorado/common/daemon"
"akvorado/common/helpers"

View File

@@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"akvorado/common/helpers"
"akvorado/common/kafka"

View File

@@ -8,7 +8,7 @@ import (
"fmt"
"strings"
"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"akvorado/common/kafka"
"akvorado/common/reporter"