testkafka

package
v0.0.0-...-f8e07d0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCluster

func CreateCluster(t testing.TB, numPartitions int32, topicName string, opts ...Opt) (*kfake.Cluster, string)

CreateCluster returns a fake Kafka cluster for unit testing.

func CreateClusterWithoutCustomConsumerGroupsSupport

func CreateClusterWithoutCustomConsumerGroupsSupport(t testing.TB, numPartitions int32, topicName string, opts ...Opt) (*kfake.Cluster, string)

func CreateProduceResponseError

func CreateProduceResponseError(version int16, topic string, partition int32, err *kerr.Error) *kmsg.ProduceResponse

CreateProduceResponseError returns a kmsg.ProduceResponse containing err for the input topic and partition.

Types

type Opt

type Opt func() []kfake.Opt

func WithSASLPlain

func WithSASLPlain(username, password string) Opt

WithSASLPlain enables SASL plain authentication in the Kafka fake server, expecting the input username and password credentials.

Jump to

Keyboard shortcuts

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