kafka

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

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

Consumer ...

func ConsumeGroup

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

ConsumeGroup ...

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 ...

type ContainerConnectionConfig added in v0.1.5

type ContainerConnectionConfig struct {
	tc.ContainerConfig
	Brokers      []string
	KafkaVersion string
}

ContainerConnectionConfig ...

func StartKafkaContainer added in v0.1.5

func StartKafkaContainer(options ContainerOptions) (testcontainers.Container, *ContainerConnectionConfig, testcontainers.Container, testcontainers.Network, error)

StartKafkaContainer ...

func StartStandaloneKafkaContainer added in v0.1.5

func StartStandaloneKafkaContainer(options ContainerOptions) (testcontainers.Container, *ContainerConnectionConfig, error)

StartStandaloneKafkaContainer ...

type ContainerOptions added in v0.1.5

type ContainerOptions struct {
	tc.ContainerOptions
	StartZookeeper bool
}

ContainerOptions ...

type Producer

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

Producer ...

func CreateProducer

func CreateProducer(ctx context.Context, options ProducerOptions) (*Producer, error)

CreateProducer ...

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 ...

Jump to

Keyboard shortcuts

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