tkafka

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBrokerAddress = []string{"127.0.0.1:9092"}

Functions

func BrokerAddress

func BrokerAddress() []string

func Config

func Config() wkafka.Config

Config returns the default configuration for Kafka for testing.

func TestClient

func TestClient() (*wkafka.Client, error)

Types

type Generate

type Generate struct {
	Topics []string
	// contains filtered or unexported fields
}

func NewGenerate

func NewGenerate(c *wkafka.Client) *Generate

func (*Generate) Cleanup

func (g *Generate) Cleanup() (kadm.DeleteTopicResponses, error)

func (*Generate) CreateTopics

func (g *Generate) CreateTopics(ctx context.Context, topics ...Topic) ([]kadm.CreateTopicResponse, error)

type Topic

type Topic struct {
	Name string

	// Partitions defaults to -1, which means the broker default.
	Partitions int32
	// ReplicationFactor defaults to -1, which means the broker default.
	ReplicationFactor int16
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL