Skip to content

Commit

Permalink
kafka-kit/v4
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiealquiza committed May 12, 2022
1 parent 8306f8d commit 1d2f764
Show file tree
Hide file tree
Showing 60 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion cluster/zookeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"syscall"
"time"

zklocking "github.com/DataDog/kafka-kit/v3/cluster/zookeeper"
zklocking "github.com/DataDog/kafka-kit/v4/cluster/zookeeper"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cluster/zookeeper/zookeeper-example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"syscall"
"time"

zklocking "github.com/DataDog/kafka-kit/v3/cluster/zookeeper"
zklocking "github.com/DataDog/kafka-kit/v4/cluster/zookeeper"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/autothrottle/brokers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sort"
"strconv"

"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

// reassigningBrokers holds several sets of brokers participating
Expand Down
4 changes: 2 additions & 2 deletions cmd/autothrottle/brokers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"sort"
"testing"

"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

func TestGetReassigningBrokers(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/autothrottle/capacities.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
)

// replicationCapacityByBroker is a mapping of broker ID to capacity.
Expand Down
2 changes: 1 addition & 1 deletion cmd/autothrottle/capacities_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"testing"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

func TestBrokerReplicationCapacities(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/autothrottle/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
)

// Events configs.
Expand Down
4 changes: 2 additions & 2 deletions cmd/autothrottle/internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sort"
"strconv"

"github.com/DataDog/kafka-kit/v3/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

// APIConfig holds configuration params for the admin API.
Expand Down
2 changes: 1 addition & 1 deletion cmd/autothrottle/internal/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

func TestSetThrottle(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/autothrottle/internal/throttlestore/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strconv"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/autothrottle/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"math"

"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
)

// Limits is a map of instance-type to network bandwidth limits.
Expand Down
2 changes: 1 addition & 1 deletion cmd/autothrottle/limits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"testing"

"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
)

func TestNewLimits(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions cmd/autothrottle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"strings"
"time"

"github.com/DataDog/kafka-kit/v3/cmd/autothrottle/internal/api"
"github.com/DataDog/kafka-kit/v3/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v3/kafkametrics/datadog"
"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/cmd/autothrottle/internal/api"
"github.com/DataDog/kafka-kit/v4/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkametrics/datadog"
"github.com/DataDog/kafka-kit/v4/kafkazk"

"github.com/jamiealquiza/envy"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/autothrottle/throttle_update_legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

func (tm *ThrottleManager) legacyApplyBrokerThrottles(configs map[int]kafkazk.KafkaConfig, capacities replicationCapacityByBroker) (chan brokerChangeEvent, []error) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/autothrottle/throttles.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"time"

"github.com/DataDog/kafka-kit/v3/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v3/kafkaadmin"
"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v4/kafkaadmin"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

// ThrottleManager manages Kafka throttle rates.
Expand Down
10 changes: 5 additions & 5 deletions cmd/autothrottle/throttles_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"strconv"
"strings"

"github.com/DataDog/kafka-kit/v3/cmd/autothrottle/internal/api"
"github.com/DataDog/kafka-kit/v3/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v3/kafkaadmin"
"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/cmd/autothrottle/internal/api"
"github.com/DataDog/kafka-kit/v4/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v4/kafkaadmin"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

// brokerChangeEvent is the message type returned in the events channel from the
Expand Down
2 changes: 1 addition & 1 deletion cmd/autothrottle/topics_legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"strconv"

"github.com/DataDog/kafka-kit/v3/mapper"
"github.com/DataDog/kafka-kit/v4/mapper"
)

// TopicStates is a map of topic names to kafakzk.TopicState.
Expand Down
4 changes: 2 additions & 2 deletions cmd/autothrottle/topics_legacy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"testing"

"github.com/DataDog/kafka-kit/v3/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

func TestLegacyGetTopicsWithThrottledBrokers(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/autothrottle/topics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"testing"

"github.com/DataDog/kafka-kit/v3/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v3/kafkaadmin/stub"
"github.com/DataDog/kafka-kit/v4/cmd/autothrottle/internal/throttlestore"
"github.com/DataDog/kafka-kit/v4/kafkaadmin/stub"
)

func TestAddReplica(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/metricsfetcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"os"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkazk"

"github.com/jamiealquiza/envy"
dd "github.com/zorkian/go-datadog-api"
Expand Down
6 changes: 3 additions & 3 deletions cmd/registry/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"syscall"
"time"

"github.com/DataDog/kafka-kit/v3/kafkaadmin"
"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v3/registry/server"
"github.com/DataDog/kafka-kit/v4/kafkaadmin"
"github.com/DataDog/kafka-kit/v4/kafkazk"
"github.com/DataDog/kafka-kit/v4/registry/server"

"github.com/Masterminds/semver"
"github.com/jamiealquiza/envy"
Expand Down
2 changes: 1 addition & 1 deletion cmd/topicmappr/commands/chunked_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io/ioutil"
"testing"

"github.com/DataDog/kafka-kit/v3/mapper"
"github.com/DataDog/kafka-kit/v4/mapper"
)

func TestBasicChunkedDownscale(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/topicmappr/commands/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkazk"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/topicmappr/commands/evac_leadership_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package commands
import (
"testing"

"github.com/DataDog/kafka-kit/v3/mapper"
"github.com/DataDog/kafka-kit/v4/mapper"
)

var topic = "testTopic"
Expand Down
4 changes: 2 additions & 2 deletions cmd/topicmappr/commands/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"regexp"
"time"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v3/mapper"
"github.com/DataDog/kafka-kit/v4/kafkazk"
"github.com/DataDog/kafka-kit/v4/mapper"
)

// checkMetaAge checks the age of the stored partition and broker storage
Expand Down
4 changes: 2 additions & 2 deletions cmd/topicmappr/commands/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sort"
"testing"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v3/mapper"
"github.com/DataDog/kafka-kit/v4/kafkazk"
"github.com/DataDog/kafka-kit/v4/mapper"
)

func TestRemoveTopics(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/topicmappr/commands/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"sort"

"github.com/DataDog/kafka-kit/v3/mapper"
"github.com/DataDog/kafka-kit/v4/mapper"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/topicmappr/commands/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package commands
import (
"fmt"

"github.com/DataDog/kafka-kit/v3/mapper"
"github.com/DataDog/kafka-kit/v4/mapper"
)

// Relocation is a kafakzk.Partition to destination broker ID.
Expand Down
4 changes: 2 additions & 2 deletions cmd/topicmappr/commands/reassignments.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sort"
"sync"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v3/mapper"
"github.com/DataDog/kafka-kit/v4/kafkazk"
"github.com/DataDog/kafka-kit/v4/mapper"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/topicmappr/commands/rebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"regexp"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkazk"

"github.com/spf13/cobra"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/topicmappr/commands/rebuild_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v3/mapper"
"github.com/DataDog/kafka-kit/v4/kafkazk"
"github.com/DataDog/kafka-kit/v4/mapper"
)

func runRebuild(params rebuildParams, zk kafkazk.Handler) ([]*mapper.PartitionMap, []error) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/topicmappr/commands/rebuild_steps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package commands
import (
"testing"

"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/DataDog/kafka-kit/v4/kafkazk"
)

func TestNotInReplicaSet(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/topicmappr/commands/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

// This can be set with
// -ldflags "-X github.com/DataDog/kafka-kit/v3/cmd/topicmappr/commands.version=x.x.x"
// -ldflags "-X github.com/DataDog/kafka-kit/v4/cmd/topicmappr/commands.version=x.x.x"
var version = "0.0.0"

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/topicmappr/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "github.com/DataDog/kafka-kit/v3/cmd/topicmappr/commands"
import "github.com/DataDog/kafka-kit/v4/cmd/topicmappr/commands"

func main() {
commands.Execute()
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/DataDog/kafka-kit/v3
module github.com/DataDog/kafka-kit/v4

go 1.17

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

"github.com/DataDog/kafka-kit/v3/kafkaadmin"
"github.com/DataDog/kafka-kit/v4/kafkaadmin"
)

// StubClient is a stubbed implementation of KafkaAdminClient.
Expand Down
2 changes: 1 addition & 1 deletion kafkaadmin/stub/metadata.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stub

import (
"github.com/DataDog/kafka-kit/v3/kafkaadmin"
"github.com/DataDog/kafka-kit/v4/kafkaadmin"

"github.com/confluentinc/confluent-kafka-go/kafka"
)
Expand Down
2 changes: 1 addition & 1 deletion kafkametrics/datadog/datadog.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"regexp"
"time"

"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkametrics"

dd "github.com/zorkian/go-datadog-api"
)
Expand Down
2 changes: 1 addition & 1 deletion kafkametrics/datadog/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"strings"

"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkametrics"

dd "github.com/zorkian/go-datadog-api"
)
Expand Down
2 changes: 1 addition & 1 deletion kafkametrics/datadog/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v4/kafkametrics"
)

func TestMergeBrokerLists(t *testing.T) {
Expand Down
Loading

0 comments on commit 1d2f764

Please sign in to comment.