kafka

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Composed added in v0.2.2

type Composed struct {
	Kafka     *Container
	Zookeeper *tczk.Container
	Network   testcontainers.Network
}

Composed ...

func Start added in v0.2.2

func Start(ctx context.Context, options Options) (Composed, error)

Start ...

func (*Composed) Terminate added in v0.2.2

func (c *Composed) Terminate(ctx context.Context)

Terminate ...

type Consumer

type Consumer struct {
	MessageChan chan *sarama.ConsumerMessage
	// contains filtered or unexported fields
}

Consumer ...

func (*Consumer) Cleanup

func (consumer *Consumer) Cleanup(sarama.ConsumerGroupSession) error

Cleanup ...

func (*Consumer) Close

func (consumer *Consumer) Close() error

Close ...

func (*Consumer) ConsumeClaim

func (consumer *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

ConsumeClaim ...

func (*Consumer) Setup

func (consumer *Consumer) Setup(sarama.ConsumerGroupSession) error

Setup ...

type ConsumerOptions

type ConsumerOptions struct {
	Brokers []string
	Group   string
	Version string
	Topics  []string
}

ConsumerOptions ...

func (*ConsumerOptions) StartConsumer added in v0.2.2

func (options *ConsumerOptions) StartConsumer(ctx context.Context) (Consumer, *sync.WaitGroup, error)

StartConsumer ...

type Container added in v0.2.2

type Container struct {
	tc.ContainerConfig
	Container testcontainers.Container
	Host      string
	Port      int
	Brokers   []string
	Listeners []string
	Version   string
}

Container ...

func (*Container) Terminate added in v0.2.2

func (c *Container) Terminate(ctx context.Context)

Terminate ...

type Options added in v0.2.2

type Options struct {
	tc.ContainerOptions
	LogLevel          string
	KafkaImageTag     string
	ZookeeperImageTag string
}

Options ...

type Producer

type Producer struct {
	DataCollector     sarama.SyncProducer
	AccessLogProducer sarama.AsyncProducer
}

Producer ...

func (*Producer) Close

func (p *Producer) Close() error

Close ...

func (*Producer) Send

func (p *Producer) Send(topic string, pkey string, entry sarama.Encoder)

Send ...

type ProducerOptions

type ProducerOptions struct {
	Brokers []string
	Group   string
	Version string
	Topics  []string
}

ProducerOptions ...

func (*ProducerOptions) NewProducer added in v0.2.2

func (options *ProducerOptions) NewProducer() (*Producer, error)

NewProducer ...

Jump to

Keyboard shortcuts

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