kafka

package
v0.0.0-...-edeb7e2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerPeer

type BrokerPeer struct {
	// contains filtered or unexported fields
}

BrokerPeer implements the peer interface for AMQP brokers

func NewBrokerPeer

func NewBrokerPeer(settings broker.MQSettings) *BrokerPeer

NewPeer creates and returns a new Peer for communicating with Kafka

func (*BrokerPeer) GetResults

func (bp *BrokerPeer) GetResults() *broker.Results

func (*BrokerPeer) SetupPublishers

func (bp *BrokerPeer) SetupPublishers() error

func (*BrokerPeer) SetupSubscribers

func (bp *BrokerPeer) SetupSubscribers() error

func (*BrokerPeer) StartPublishers

func (bp *BrokerPeer) StartPublishers()

func (*BrokerPeer) StartSubscribers

func (bp *BrokerPeer) StartSubscribers()

func (*BrokerPeer) Teardown

func (bp *BrokerPeer) Teardown()

Performs any broker-connection cleanup after test is done

type Consumer

type Consumer struct {
	// contains filtered or unexported fields
}

Consumer represents a Sarama consumer group consumer

func (*Consumer) Cleanup

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

Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited

func (*Consumer) ConsumeClaim

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

ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages(). NOTE: The function itself is called within a goroutine

func (*Consumer) Setup

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

Setup is run at the beginning of a new session, before ConsumeClaim

type Peer

type Peer struct {
	// contains filtered or unexported fields
}

Peer stores specific Kafka broker connection information

func (*Peer) DoneChannel

func (p *Peer) DoneChannel()

DoneChannel signals to the peer that message publishing has completed.

func (*Peer) ErrorChannel

func (p *Peer) ErrorChannel() <-chan error

ErrorChannel returns the channel on which the peer sends publish errors.

func (*Peer) ReceiveMessage

func (p *Peer) ReceiveMessage() ([]byte, error)

func (*Peer) SendChannel

func (p *Peer) SendChannel() chan<- []byte

Send returns a channel on which messages can be sent for publishing.

func (*Peer) SetupPublishRoutine

func (p *Peer) SetupPublishRoutine()

func (*Peer) SetupPublisherConnection

func (p *Peer) SetupPublisherConnection(connectionURL string) error

func (*Peer) SetupSubscriberConnection

func (p *Peer) SetupSubscriberConnection(connectionURL string) error

Jump to

Keyboard shortcuts

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